2017-08-27 110 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中出現溢出時纔可見。

希望這會有所幫助。