我有一个带有滚动条的弹出窗口
的HTML
<ul class="navbar-nav pull-right">
<li><a href="#" data-toggle="popover" title="Notifications" data-html="true" data-content="<a href='?Profile'><div class='pop-text'>Notification 1</div></a><hr /><a href='?Profile'><div class='pop-text'>Notification 2</div></a><hr /><a href='?Profile'><div class='pop-text'>Notification 3</div></a><hr /><a href='?Profile'><div class='pop-text'>Notification 4</div></a><hr /><div><p id='foot-notification-pop'><a href='?notification'>Show all</a></p></div>">Notification</a></li>
</ul>
的CSS
.popover-content {
height: 200px;
overflow-y: scroll;
}
我只想在需要时显示滚动条,也就是仅当popover-content的高度超过200px时才显示。滚动条始终显示,但高度小于200px时不可单击(当然)。我该怎么做?任何帮助将不胜感激。谢谢!
您可以使用overflow:auto
。在此处阅读有关溢出属性的更多信息
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句