Bootstrap中文网
1. 工具提示框
工具提示框需要用js来实现,如下: 更改data-placement="left"中的值可改变提示方向”right”、”top”、”bottom”、”left”。
html:
<button
type="button" class
="btn btn-danger" title
="向左显示" data-toggle="tooltip" data-placement="left">向左
</button
>
js:
$('[
data-toggle="tooltip"]').tooltip();
2.弹出框
和工具提示框一样,可以更改方向。
html:
<button
type="button" class
="btn btn-danger" title
="向左显示" data-content="这里是内容这里是内容这里是内容这里是内容" data-toggle="popover" data-placement="left">向左
</button
>
js:
$('[
data-toggle="popover"]').popover();
转载请注明原文地址: https://ju.6miu.com/read-10709.html