美文网首页我爱编程
bootstrap弹出层效果

bootstrap弹出层效果

作者: BIDIU猿 | 来源:发表于2015-03-08 16:19 被阅读3215次

    jquery不能驾驭就用bootstrap干活吧哈哈

    html
    <!DOCTYPE html>  
    <html>  
        <head>  
            <meta http-equiv="Content-type" content="text/html; charset=utf-8">  
            <link rel="stylesheet" href="http://files.cnblogs.com/rubylouvre/bootstrap.css"/>   
            <script src="http://files.cnblogs.com/rubylouvre/jquery1.83.js" > </script>  
            <script src="http://files.cnblogs.com/rubylouvre/bootstrap-transition.js"></script>  
            <script src="http://files.cnblogs.com/rubylouvre/bootstrap-modal.js"></script>  
       
             
        </head>  
        <body>  
            <a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>  
            <!-- Modal -->  
            <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">  
                <div class="modal-header">  
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>  
                    <h3 id="myModalLabel">Modal header</h3>  
                </div>  
                <div class="modal-body">  
                    <p>弹出层…</p>  
                </div>  
                <div class="modal-footer">  
                    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>  
                    <button class="btn btn-primary">Save changes</button>  
                </div>  
            </div>  
        </body>  
    </html>  
    

    调出弹出框框要有超链接。
    超链接中要有data-toggle="modal"标签,链接href="#a"要和弹出框的id="a"相符。
    弹出框标签class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"尚未搞懂吃个饭继续。

    相关文章

      网友评论

        本文标题:bootstrap弹出层效果

        本文链接:https://www.haomeiwen.com/subject/wasvxttx.html