physical screen pixels with CSS
I have a Flash object that I need to embed in a page, and I've got it in a wrapper div that is styled to the exact width of the object: 323px. The problem I have is that when I zoom the whole page in the browser (for example, by using ctrl+mouse wheel, or ctrl++ or ctrl+-, t开发者_如何学Pythonhe wrapper div zooms, while the flash object does not. Is there a way that I can specify a width in physical screen pixels, so when I zoom in or out, the wrapper div stays the size of the Flash object?
You could use onResize in javascript, and always set the wrapper div's size to that fixed value of 323px
If you use jQuery see this.
$(window).resize(function() { $('#wrapper').width(323px); });
Hope this helps.
精彩评论