【发布时间】:2014-04-02 04:15:02
【问题描述】:
这是图片(我必须做的)
如何为弹出框添加页脚并使内容可滚动?使用 Twitter 引导程序 3
【问题讨论】:
-
伙计,代码太多了。我已经上传了文件sendspace.com/file/s1a20g
标签: twitter-bootstrap twitter-bootstrap-3 scrollbar popover
这是图片(我必须做的)
如何为弹出框添加页脚并使内容可滚动?使用 Twitter 引导程序 3
【问题讨论】:
标签: twitter-bootstrap twitter-bootstrap-3 scrollbar popover
要创建带有页脚的弹出框,您必须更改弹出框 template 并添加一些 CSS 来设置该页脚的样式。在这里,我还在页脚中放置了一个按钮,正如您在绘图中包含的那样,但您必须弄清楚自己想用它做什么。
<div class="popover">
<div class="arrow"></div>
<h3 class="popover-title"></h3>
<div class="popover-content"></div>
<div class="popover-footer">
<button type="button" class="btn btn-default">Button</button>
</div>
</div>
$("[rel=details]").popover({
trigger : 'click',
placement : 'bottom',
content : 'Lorem ipsum dolor ...',
template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div><div class="popover-footer"><button type="button" class="btn btn-default">Button</button></div></div>'
});
设置页脚样式:
.popover-footer {
margin: 0;
padding: 8px 14px;
font-size: 14px;
font-weight: 400;
line-height: 18px;
background-color: #F7F7F7;
border-bottom: 1px solid #EBEBEB;
border-radius: 5px 5px 0 0;
}
使弹出内容可滚动:
.popover-content {
overflow-y : scroll;
height: 200px;
}
查看演示 -> http://jsfiddle.net/3x4yD/
【讨论】:
border-top: 1px solid #EBEBEB; border-radius: 0 0 5px 5px;