2017-08-27 80 views
3

如何在弹出窗口内添加滚动条,以便我可以访问弹出窗口内的搜索结果?滚动条内弹出窗口

我的弹出窗口代码:

<html> 
<body> 

<link rel="stylesheet" type="text/css" href="https://secure.duoservers.com/tld-search/api-search.css?color=0000ff&width=700"/> 
<script type="text/javascript" src="https://secure.duoservers.com/tld-search/api-search.js?lang=en&store=7xhosting"></script> 
<script type="text/javascript"> 
searchApiOptions = { 
    store: "7xhosting", 
    containerId: "divID", 
    submitURL: "", 
    selectedTld: "com", 
    popupBox: true, 
    floatingBox: false 
}; 
</script> 
<div id="divID"></div> 

</body> 
</html> 

Image1Image2

回答

2

要强制滚动条,你要接受它,这样在元素上设置overflow-yscroll

#divID { 
    overflow-y: scroll; 
} 
0

有一些最小高度和高度的CSS

div#divId 
{ 
    min-height:300px; 
    height:300px; 
    overflow:scroll; 
} 

设置,然后设置溢出:滚动

0

.divID{ 
 
    overflow-x:hidden; 
 
    overflow-y:auto; 
 
    min-height:200px; 
 
    max-height:250px; 
 
}

,而不是idclass到你的div。 我给出了overflow-y:auto,所以滚动条只有在div中出现溢出时才可见。

希望这会有所帮助。