• 用bootstrap3模态框模拟手机datapicker插件


    <!DOCTYPE html>
    <html>
    
    <head>
        <meta charset="utf-8">
        <title>datapicker</title>
        <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
        <style>
            .modal-dialog {
                position: absolute;
                bottom: 0;
                width: 100%;
                margin: 0;
            }
    
            .modal-content {
                position: absolute;
                left: 0;
                right: 0;
                bottom: 0;
                border-radius: 0;
            }
    
            .modal-body {
                padding-left: 0;
                padding-right: 0;
                overflow-y: scroll;
                bottom: 0;
                max-height: 200px;
                text-align: center;
            }
    
            .modal.fade.modal-dialog {
                -webkit-transform: translate(0, 25%);
                -ms-transform: translate(0, 25%);
                -o-transform: translate(0, 25%);
                transform: translate(0, 25%);
            }
        </style>
        <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
        <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    </head>
    
    <body>
    
        <h2>创建模态框(Modal)</h2>
        <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
            开始演示模态框
        </button>
        <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">
                        模态框(Modal)标题
                    </h4>
                </div> -->
                    <div class="modal-body">
                        <a href="#" class="list-group-item active">
                            苹果
                        </a>
                        <a href="#" class="list-group-item">小米</a>
                        <a href="#" class="list-group-item">三星</a>
                        <a href="#" class="list-group-item">OPPO</a>
                        <a href="#" class="list-group-item">华为</a>
                        <a href="#" class="list-group-item">一加</a>
                        <a href="#" class="list-group-item">魅族</a>
                    </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>

    显示效果如下:

  • 相关阅读:
    简体转换繁体
    错误解决:[A potentially dangerous Request.Form value was detected from the client (warning="卡Ć..."). ]
    如何准备软件工程师的面试[转Google]
    Microsoft New DownLoad Address [Share]
    仿windows关机对话框的提示框效果
    JS弹出窗口的运用与技巧
    2007新年贺语
    VSTOexcel编程 [待续] [12月5日更新,详见文档下面]
    常用的SQL和TSQL语句(一)
    常用的SQL和TSQL语句(三)行列转换
  • 原文地址:https://www.cnblogs.com/real-bert/p/15243913.html
Copyright © 2020-2023  润新知