百度登錄框架

百度登錄

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style>
            body{
                margin: 0;
                padding: 0;
            }
            img{
                width: 270px;
                height: 129px;
                display: block;
                margin: 10px auto;
            }
            .btn{

            }
            font:hover{
                cursor: pointer;
                color: red;
            }
            .back-img{
                border: 1px solid #000000;
                position: absolute;
                width: 100%;
                height: 100%;
                top: 0px;
                left: 0px;
                background-color: #000000;
                opacity: 0.3;
                z-index: 100;
                display: none;
            }
            .login{
                border: 1px solid #000000;
                width: 390px;
                height: 500px;
                position: absolute;
                top:26%;
                left: 35%;
                background-color:pink;
                z-index: 110;
                display: none;
            }
            .login-top{
                position: absolute;
                width: 100%;
                height: 10%;
                background-color: gray;
            }
            .close-login{
                display: block;
                position: absolute;
                right: 10px;
                top: 5px;
                width: 30px;
                height: 30px;
                text-align: center;
                line-height: 30px;
                font-size: 30px;
                color: #FFFFFF;
            }
            .close-login:hover{
                border: 1px solid #FFFFFF;
                cursor: pointer;
            }
            .login-top:hover{
                cursor: move;
            }
        </style>
        <script type="text/javascript" src="js/a.js" ></script>
        <script>

            //點擊登錄
            function login(){
                //獲取覆蓋圖層對象
                var backimg = document.getElementById("backimg");
                //登錄框的div對象
                var login = document.getElementById("move_div");

                login.style.display = "block";
                backimg.style.display = "block";

            }

            //隱藏登錄彈出框
            function loginClose(){
                //登錄框的div對象
                var login = document.getElementById("move_div");
                //獲取覆蓋圖層對象
                var backimg = document.getElementById("backimg");

                login.style.display = "none";
                backimg.style.display = "none";

            }

        </script>
    </head>
    <body>

        <div id="backimg" class="back-img" ></div>

        <div  id="move_div" class="login">

            <!--登錄彈出框頂部-->
            <div class="login-top" onmousedown="down()" onmouseup="up()" onmousemove="move()">
                <span class="close-login" onclick="loginClose()">×</span>
            </div>

        </div>

        <div class="top">
            <font onclick="login()">登錄</font>
        </div>

        <img src="img/logo.png" />

        <div class="btn">
            <input type="text" />
            <button>百度一下</button>
        </div>

    </body>
</html>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章