首页 > 其他 > 详细

Bootstrap方法为页面添加一个弹出框

时间:2017-03-18 00:41:53      阅读:350      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"> 
    <title>Bootstrap 实例 - 弹出框(Popover)插件</title>
    <link rel="stylesheet" href="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container" style="padding: 100px 50px 10px;" >
    <button type="button" class="btn btn-default" title="Popover title"  
            data-container="body" data-toggle="popover" data-placement="left" 
            data-content="左侧的 Popover 中的一些内容">
        左侧的 Popover
    </button>
    <button type="button" class="btn btn-primary" title="Popover title"  
            data-container="body" data-toggle="popover" data-placement="top" 
            data-content="顶部的 Popover 中的一些内容">
        顶部的 Popover
    </button>
    <button type="button" class="btn btn-success" title="Popover title"  
            data-container="body" data-toggle="popover" data-placement="bottom" 
            data-content="底部的 Popover 中的一些内容">
        底部的 Popover
    </button>
    <button type="button" class="btn btn-warning" title="Popover title"  
            data-container="body" data-toggle="popover" data-placement="right" 
            data-content="右侧的 Popover 中的一些内容">
        右侧的 Popover
    </button>
</div>
<script>
$(function () { 
    $("[data-toggle=‘popover‘]").popover();
});
</script>

</body>
</html>

技术分享

Bootstrap方法为页面添加一个弹出框

原文:http://www.cnblogs.com/gwcyulong/p/6569210.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!