【发布时间】:2014-02-22 18:32:25
【问题描述】:
我有这个弹出框,带有滚动条
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-body {
height: 200px;
overflow-y: auto;
}
我只想在需要时显示滚动条,即只有当弹出内容的高度超过 200px 时。当时滚动条始终显示,但在高度小于 200px 时(当然)不可点击。 我该怎么做? 任何帮助将不胜感激。谢谢!
【问题讨论】:
标签: html css twitter-bootstrap scroll popover