如何使用'window.open'在firefox中使用滚动条创建? [英] How to use 'window.open' to create with scrollbar in firefox?
本文介绍了如何使用'window.open'在firefox中使用滚动条创建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用'window.open'在firefox中创建一个带滚动条的新窗口?
How do I use 'window.open' to create a new window with scrollbars in firefox?
谢谢!
推荐答案
这应该这样做:
window.open("http://example.com", "name", "scrollbars=1,width=100,height=100");
但请注意,只有当内容大于窗口时,Firefox才会显示滚动条。
but note that Firefox will only show scrollbars when the content is larger than the window.
要强制Firefox始终显示滚动条(如Internet Explorer一样),您需要在弹出窗口中显示的HTML样式表中显示:
To force Firefox to always show a scrollbar (like Internet Explorer does) you need this in the stylesheet of the HTML that's being shown in the popup:
html {
overflow: -moz-scrollbars-vertical;
}
这篇关于如何使用'window.open'在firefox中使用滚动条创建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文