如何为popover添加页脚并使内容可滚动?使用Twitter bootstrap 3

Dj.*_*ise 5 scrollbar popover twitter-bootstrap twitter-bootstrap-3

这是图像(我要做的)

在此输入图像描述

如何添加页脚到弹出窗口并使内容可滚动?使用Twitter bootstrap 3

dav*_*rad 11

要使用页脚创建弹出窗口,您必须更改弹出框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>
Run Code Online (Sandbox Code Playgroud)
$("[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>' 
});
Run Code Online (Sandbox Code Playgroud)

样式的页脚:

.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;
}
Run Code Online (Sandbox Code Playgroud)

使popover-content可滚动:

.popover-content {
  overflow-y : scroll;
  height: 200px;  
}
Run Code Online (Sandbox Code Playgroud)

看演示 - > http://jsfiddle.net/3x4yD/

在此输入图像描述