在bootstrap popover中弹出html内容

时间:2017-11-19 14:34:11

标签: html css twitter-bootstrap

我在popover中写了这个代码用于放置html:

<span class="glyphicon glyphicon-envelope" data-placement="bottom" data-toggle="popover" title="Popover Header" data-content="<div id='custom_tooltip_text' style='width: 300px; height: 250px; background-color: red;'>
<a href='#'>link 1</a>
<a href='#'>link 1</a>
<a href='#'>link 1</a>
<a href='#'>link 1</a>
<a href='#'>link 1</a>
</div>"    
<span class="badge" id="badge_message">5</span>
</span>

结果: result

弹出窗口中的html内容弹出

我该如何解决?

1 个答案:

答案 0 :(得分:0)

您必须将max-width取消设置为您的popover类:

<强> CSS

.popover{max-width: inherit;}

Bootply https://www.bootply.com/xLV7f6JHE5