gpt4 book ai didi

html - 在 bootstrap popover 中弹出 html 内容

转载 作者:行者123 更新时间:2023-11-28 02:36:45 26 4
gpt4 key购买 nike

我写这段代码是为了将 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内容

我该如何解决?

最佳答案

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

CSS

.popover{max-width: inherit;}

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

关于html - 在 bootstrap popover 中弹出 html 内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47378021/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com