开发者

window.open specify content size not window size?

When you do a window.open() you can specify the size of the new window. well depending on a lot of things (like browser, toolbars, etc.) the viewport can vary in size.

For example if I have an image that is 500x400 in size, and I want to open a 开发者_C百科new window to show exactly that image with no access white space, and no need for scrolling. the window size will vary to make this always true.

So is there a way to specify the viewport size of a new window, instead of the window size?

Thanks!


You'll need to calculate the viewport size and tweak your window size accordingly.


Only the windowsize but you can calculate the viewport

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜