zoukankan      html  css  js  c++  java
  • Bootstrap 遮罩层实现方式

    直接上代码:
    <!DOCTYPE html>
    <html>
    
        <head>
            <meta charset="utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
            <!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
            <title>影音先锋</title>
            <!-- Bootstrap -->
            <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/bootstrap/3.0.0/css/bootstrap.min.css">
            <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
            <!--<script src="js/jquery.min.js"></script>-->
            <script src="js/jquery-2.1.4.min.js"></script>
            <!-- Include all compiled plugins (below), or include individual files as needed -->
            <script src="js/bootstrap.min.js"></script>
    
            <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
            <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
            <!--[if lt IE 9]>
              <script src="js/adaptIE/html5shiv.min.js"></script>
              <script src="js/adaptIE/respond.min.js"></script>
            <![endif]-->
    
            <style>
    
            </style>
        </head>
    
        <body>
            <div class="container-fluid text-center">
                <h2>遮罩层DEMO</h2>
                <!-- 按钮触发模态框 -->
                <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
                   打开遮罩层
            </button>
    
                <!-- 模态框(Modal) -->
                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                      &times;
                </button>
                                <h4 class="modal-title" id="myModalLabel">
                      遮罩层标题
                </h4>
                            </div>
                            <div class="modal-body">
                                在这里添加一些文本
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                </button>
                                <button type="button" class="btn btn-primary">
                   提交更改
                </button>
                            </div>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                    <!-- /.modal -->
                </div>
        </body>
    
    </html>
     
  • 相关阅读:
    Hexo Daemon
    Eclipse远程Debug
    IT人都欠自已一个Lable Page
    Linux下java/bin目录下的命令集合
    python笔记--5--文件操作
    python笔记--4--面向对象
    python笔记--3--函数、生成器、装饰器、函数嵌套定义、函数柯里化
    python笔记--1--基础知识、数据类型
    Django笔记--视图
    C++笔记--1
  • 原文地址:https://www.cnblogs.com/shenh/p/7542828.html
Copyright © 2011-2022 走看看