gpt4 book ai didi

javascript - Bootstrap 弹出框内的断线

转载 作者:行者123 更新时间:2023-11-30 07:07:21 27 4
gpt4 key购买 nike

我正在使用 在 bootstrap popover data-content 属性中换行,但它不起作用。这怎么可能?还有就是可以在里面做一些大胆的内容吗?

$(document).ready(function(){
$('[data-toggle="popover"]').popover();
});
 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script></script>
<div class="container">
<a href="#" title="Header" data-toggle="popover" data-trigger="hover" data-content="Hello, i need &#013; to break line.">hover me</a>
</div>

最佳答案

$(document).ready(function(){
$('[data-toggle="popover"]').popover();
});
 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script></script>
<div class="container">
<a href="#" title="Header" data-toggle="popover" data-trigger="hover" data-content="Hello, i need <br /> to break line.<b>BOLD HERE</b>" data-html="true">hover me</a>
</div>

使用 data-html="true"<br/>

关于javascript - Bootstrap 弹出框内的断线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49876355/

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