简体   繁体   English

如何使弹出窗口可滚动

[英]How to make the popup window scrollable

I am having the following code that works to open a window with some size. 我正在使用以下代码来打开某些大小的窗口。 Now need to make it scrollable. 现在需要使其可滚动。 How to do that? 怎么做? I tried browsing but, couldn't find the right one. 我尝试浏览,但是找不到正确的浏览器。

window.open("xxx","","width=1200","height=60");

您可以添加滚动条:

window.open("xxx","","width=1200, height=60, scrollbars=1");

Try this: 尝试这个:

window.open("xxx","","width=1200","height=60",scrollbars=1);

In your page ("xxx") which is used in this popup add this css: 在此弹出窗口中使用的页面(“ xxx”)中,添加以下CSS:

yourcontainer {
    overflow-y: scroll;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM