美文网首页
flash、dialog

flash、dialog

作者: Leonzai | 来源:发表于2018-06-11 20:17 被阅读19次
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
    <style>
        .flash {
            width: 14rem;
            /*width: auto;*/
            max-width: 21rem;
            font-size: 1rem;
            background: grey;
            word-wrap: break-word;
            padding: 1rem 0.7rem;
            border-radius: 0.7rem;
            margin: 0.7rem;
            opacity: 0.8;
            color: white;
            z-index:999;
            text-align: center;
            position: absolute;
            top: 0;
            right: 0;
        }

    </style>
    <script>
        // !function () {
        //     var html = document.documentElement;
        //     var setFontSize = function () {
        //         var width = html.offsetWidth;
        //         html.style.fontSize = width / 6.4 + 'px';
        //     };
        //     var timer;
        //     var setDelay = function () {
        //         return clearTimeout(timer), (timer = setTimeout(setFontSize, 150));
        //     }
        //     window.addEventListener('pageshow', function (evt) {
        //         return evt.persisted && setDelay();
        //     });
        //     window.addEventListener('resize', setDelay);
        //     setFontSize();
        // }();

    </script>
</head>
<body>
<div class="flash">恭喜,注册成功!</div>


<div class="modal" tabindex="-1" style="display: block;background: grey;opacity: 0.9">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Modal title</h5>
                <button type="button" class="close">
                    <span>&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <label for="exampleInputEmail1">Email address</label>
                        <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">Password</label>
                        <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
                    </div>
                    <button type="submit" class="btn btn-primary">Submit</button>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>



</body>
</html>

相关文章

网友评论

      本文标题:flash、dialog

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