.popover-content .btn {
padding: 0 10px;
}
.popover-btn {
text-align: right;
}
点我弹出/隐藏弹出框
点我弹出弹出框
悬浮出现弹出框
Tooltip on left
Tooltip on top
Tooltip on bottom
Tooltip on right
提示弹出框
$(function() {
$('[data-toggle="tooltip"]').tooltip()
})
$(function() {
var template = [
'
'
'
'
'
].join("");
//var title = ['
SELECT A DATE
'].join("");var content = [
'
Do you confirm to cancel this order? this
','
' Yes
].join("");
$('#popover1').popover({
html: true,
trigger: "click",
placement: 'bottom',
// title: title,
content: content,
template: template
});
$('#popover2').popover({
html: true,
trigger: "fouce",
placement: 'bottom',
// title: title,
content: content,
template: template
});
$('#popover3').popover({
html: true,
trigger: "hover",
placement: 'bottom',
// title: title,
content: content,
template: template
});
})
$(function() {
var template = [
'
'
'
'
'
].join("");
var title = [
'Title',
'×'
].join("");
var content = [
'
Content Content Content Content Content Content Content Content Content Content Content Content Content Content Content Content Content Content ContentCont.
',].join("");
$(".popover-close").click(function() {
alert(1)
$(this).parent().parent().hide()
})
$('#popover11').popover({
html: true,
trigger: "hover",
// placement: 'bottom',
title: title,
content: content,
template: template
});
$('#popover22').popover({
html: true,
trigger: "hover fouce",
placement: 'bottom',
title: title,
content: content,
template: template
});
})
一键复制
编辑
Web IDE
原始数据
按行查看
历史
本文介绍了如何在网页中使用Bootstrap的Popover和Tooltip组件,展示了不同触发方式(点击、鼠标悬停)下弹出框的创建、样式定制以及内容动态绑定。包括了多个实例代码和模板,帮助开发者快速上手并理解这些UI元素的用法。
1740

被折叠的 条评论
为什么被折叠?



