【HTML】一个简单的登陆页面

HTML页面代码如下: 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="index_style.css">
    <title>全屏背景</title>
</head>
<body>
    <div id="div_login">
        <div id="div_title"><h1>用户登陆</h1></div>
        <div id="midden">
            <p><input class="inputinfo" type="text" name="UserName" placeholder="请输入用户名"></p>
            <p><input class="inputinfo" type="password" name="PassWord" placeholder="请输入密码"></p>
            <input type="submit" class="submitbutton" value="登陆">

            <div id="info">
                    <h3>注意事项</h3>
                    <p>1.这里是注意事项这里是注意事项这里是注意事项</p>
                    <p>2.这里是注意事项这里是注意事项这里是注意事项</p>
                    <p>3.这里是注意事项这里是注意事项这里是注意事项</p>
                    <p>4.这里是注意事项这里是注意事项这里是注意事项</p>
                </div>
        </div>
        
    </div>
</body>
</html>

CSS页面代码如下: 

        html,body{
            width:100%;
            height:100%
        }
        body{
            font-family: "华文细黑";
            background:url("https://ss3.bdstatic.com/lPoZeXSm1A5BphGlnYG/skin/2.jpg?2") no-repeat;
            background-size: 100%;
        }
        #div_login{
            width:500px;
            height: 500px;
            background-color:rgba(58,58,58,0.5);
            float:right;
            margin:50px 50px;
            padding: 0px;
        }
        #div_title{
            width: 500px;
            height: 60px;
            background-color:rgba(0,0,0,0.5);
            text-align: center;
            line-height: 60px;
            color:blanchedalmond;
        }
        *{
            margin:0px;
            padding: 0px;
        }
        #midden{
            width:500px;
            height: 440px;
            background-color: rgba(77, 75, 75, 0.5);
        }
        .inputinfo{
            width: 480px;
            height:30px;
            margin:10px 10px 10px 10px;
        }
        .submitbutton{
            width: 480px;
            height:40px;
            margin:10px 10px 10px 10px;
            background-color: rgba(89, 89, 89, 0.5)
        }
        #info{
            width:200px;
            text-align: center;
            margin: 0 auto;
        }

猜你喜欢

转载自blog.csdn.net/u011182346/article/details/83213984