京東登錄頁面

HTML文件
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
                    
        <!--設置網頁標題-->
        <title>京東-歡迎登陸</title>
        <!--設置圖標
            link導入文件資源
            說明文件干嘛用的rel="icon"設置網頁圖標
            rel='stylesheet'樣式表
            文件類型type:前面是文件類型/文件后綴
            text/css 文本/css
        -->
        <link rel="icon" type="image/ico" href="img/img/icon.ico"/>
        <!--添加樣式-->
        <link rel="stylesheet" type="text/css" href="css/index.css"/>
    
    </head>
    <body>
        <!---================頂部=============-->
        <div id="top">
            <!--頂部的頂部-->
            <div id="banner">
                
                <img id="img1" src="img/img/logo.png"/>
                <img id="img2" src="img/img/l-icon.png"/>
                <a target="_blank" >登錄頁面,調查問卷</a>
            </div>
            <!--頂部的底部-->
            <div id="message">
                <p>
                    依據《網絡安全法》,為保障您的賬戶安全和正常使用,請盡快完成手機號驗證! 新版<a target="_blank" >《京東隱私政策》</a>已上線,將更有利于保護您的個人隱私。
                </p>
            </div>
            
        </div>
        <!--================內容================-->
        <div id="content">
        <img id="img1" src="img/img/bg2.png"/>
        <!--登錄框-->
        <div id="login">
            <!--頂部-->
            <div id="div1">
                <div id="text">
                    <p>
                        <img src="img/img/warning.png"/>京東不會以任何理由要求您轉賬匯款,謹防詐騙。
                    </p>
                </div>
                <div id="button">
                    <button id="btn1">掃碼登錄</button>|
                    <button id="btn2">賬號登錄</button>
                </div>
            </div>
            <!--中間-->
            <div id="div2">
                <div id="username">
                    <button id="user-btn"><img src="img/img/pygame.png"/></button>
                    <input placeholder="郵箱/用戶名/已驗證手機" type="text" name="username"  value="" />
                </div>
                <div id="password">
                    <button id='password-btn'><img src="img/img/password_icon.png"/></button>
                    <input placeholder="密碼" type="password" name="password"  value="" />
                </div>
                <a  >忘記密碼</a>
                <button id="btn1">登&nbsp;&nbsp;&nbsp;&nbsp;錄</button>
            </div>
            <!--底部-->
            <div id="div3">
                <a id="QQ" href="">QQ</a>|
            <a id="weixin" href="">微信</a>
            <a id="zhuce" href="">立即注冊</a>
                
                
                
                
            </div>
        </div>
        </div>
        <!--================底部==================-->
        <div id="bottom">
            <div id="a">
                <a href="">聯系我們</a>|
                <a href="">聯系我們</a>|
                <a href="">聯系我們</a>|
                <a href="">聯系我們</a>|
                <a href="">聯系我們</a>|
                <a href="">聯系我們</a>|
                <a href="">聯系我們</a>|
                <a href="">聯系我們</a>|
                <a href="">聯系我們</a>|
                <a href="">聯系我們</a>|
                <a href="">聯系我們</a>
                
            </div>
            <div id="p">
                <p>Copyright ? 2004-2018  京東JD.com 版權所有</p>
                
            </div>
        </div>      
    </body>
</html>

CSS文件
/*==================通用====================*/
/*注意:寫網頁前一定要先將標簽默認的margin值和padding值全部關閉*/
*{
    margin: 0;
    padding: 0;
    position: relative;
        
}

button{
    border: 0;
}
button:focus{
    
}

/*==================頂部====================*/
#top{
    /*background-color: aquamarine;*/
    height: 120px;
    
    
        
}

/*頂部的頂部*/
#top #banner{
    /*background-color: blueviolet;*/
    height:80px ;
}

#top #banner a{
    position: absolute;
    right: 180px;
    bottom: 10px;
    
    font-size: 12px;
    color: rgb(138,138,138);
    text-decoration: none;
    
    /*設置圖標
     
     * background:圖片地址 是否平鋪  x y 顏色
     * */
    background: url(../img/img/q-icon.png) no-repeat 0px center;
    padding-left:20px ;
}
#top #banner a:hover{
    color: red;
    text-decoration: underline;
}



#top #banner #img1{
    margin-left: 188px;
    
    /*垂直居中*/
    position: absolute;
    top: 50%;
    margin-top:-30px ;
    line-height: 60px;
}
#top #banner #img2{
    position: absolute;
    left: 365px;
    
    /*垂直方向居中*/
    top: 50%;
    margin-top: -8px;
    line-height: 40px;
}




/*頂部的底部*/
#top #message{
    height: 40px;
    background-color: rgb(255,246,236);
}
#top #message p{
    font-size: 11px;
    color: rgb(138,138,138);
    /*text-align: center;*/
    
    /*垂直方向居中*/
    height: 40px;
    line-height: 40px;
    
    /*水平方向居中*/
    width: 792px;
    margin-left: auto;
    margin-right: auto;
    /*調圖標的位置*/
    padding-left:25px ;
    
    background: url(../img/img/warning.png) no-repeat 0px center;
    
}
#top #message a{
    color: black;
    text-decoration: none;
}
#top #message a:hover{
    text-decoration: underline;
    
    
}

/*==================內容====================*/
#content{
    background-color: rgb(84,161,220);
    height: 475px;
        
    
}
/*==========內容背景*/
#content #img1{
    margin-left: 80px;
    position: absolute;
    top: 50%;
    margin-top: -237px;
    
}
/*==========登錄框*/
#content #login{
    background-color: white;
    height: 400px;
    width: 350px;
    position: absolute;
    right: 150px;
    top: 15px;
}
/*====登錄框的頂部*/
#content #login #div1{
    height: 100px;
    /*background-color: antiquewhite;*/
}
#content #login #div1 #text{
    height: 40px;
    background-color: rgb(255,246,236);
}
#content #login #div1 #text p{
    font-size: 11px;
    text-align: center;
    color: rgb(138,138,138);
    
    height: 40px;
    line-height: 40px;
}
#content #login #div1 #text p img{
    position: absolute;
    top:50%;
    margin-top: -12px;
    line-height: 25px;
}
#content #login #div1 #button{
    height: 60px;
    /*background-color: aqua;*/
    color: rgba(220,220,220,0.4);
    font-size: 20px;
    font-weight: 100;
    font-family: "微軟雅黑";
}

#content #login #div1 #button button{
    height: 100%;
    width: 172px;
    border: 0;
    font-size: 20px;
    color: rgb(80,80,80);
    background-color: rgba(255,255,255,0);
    
}
#content #login #div1 #button #btn2{
    float: right;
}

#content #login #div1 #button button:focus{
    color: rgb(217,34,46);
    outline: 0;
}




/*====登錄框的中間*/
#content #login #div2{
    height: 250px;
    /*background-color: #000000;*/
    border-top:1px solid rgba(220,220,220,0.5);
    border-bottom:1px solid rgba(220,220,220,0.5);
    
    
    
}
#content #login #div2 #username,#password{
    /*background-color: #7FFF00;*/
    width:300px ;
    height: 40px;
    /*水平居中*/
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgb(200, 200, 200);
}
/*用戶名和密碼*/
#content #login #div2 #username{
    margin-top: 30px;
}

#content #login #div2 #password{
    margin-top: 20px;
}

#content #login #div2 input{
    height: 100%;
    width: 249px;
    border: 0;
    padding-left: 10px;
    
    float: right;
    border-left: 1px solid rgb(200,200,200);
    font-size: 14px;    
    
}

#content #login #div2 input:focus{
    outline: 0;
}

#content #login #div2 #username #user-btn,#password-btn{
    height: 40px;
    width: 40px;
    /*background-color: chartreuse;*/
}
#content #login #div2 #username #user-btn img, #password-btn img{
    width:  100%;
    height: 100%;
}





/*忘記密碼*/
#content #login #div2 a{
    position: absolute;
    right: 25px;
    margin-top: 20px;
    
    font-size: 13px;
    color: rgb(138,138,138);
    text-decoration: none;
}
#content #login #div2 a:hover{
    text-decoration: underline;
    color: red;
}
/*登錄按鈕*/
#content #login #div2 #btn1{
    display: block;
    width: 300px;
    height: 35px;
    
    position: absolute;
    bottom: 30px;
    left: 25px;
    border: 0;
    background-color: red;
    color: white;
    font-size: 20px;
    
}
#content #login #div2 #btn1:focus{
    outline: none;
}
/*點擊按鈕是添加邊框效果*/
#content #login #div2 #btn1:active{
    border: 2px solid lightskyblue ;
    border-radius: 4px;
}
/*=====登錄框的底部*/
#content #login #div3{
    height: 50px;
    /*background-color: blue;*/
    /*內容垂直方向居中*/
    line-height: 50px;
    
    font-size: 8px;
    color: rgb(138,138,138);
    
    
}
#content #login #div3 a{
    font-size: 12px;
    color: rgb(138,138,138);
    text-decoration: none;
    
}
#content #login #div3 a:hover{
    color: red;
    text-decoration: underline;
}
#content #login #div3 #zhuce{
    position: absolute;
    right: 25px;
    background: url(../img/img/right.png) no-repeat 0 center;
    padding-left: 25px;
}
#content #login #div3 #QQ{
    margin-left: 25px;
    margin-right: 15px;
    background: url(../img/img/qq.png) no-repeat 0 center;
    padding-left: 25px;
}
#content #login #div3 #weixin{
    margin-left: 5px;
    background: url(../img/img/weixin.png) no-repeat 0 center;
    padding-left: 25px;
}


/*==================底部====================*/
#bottom{
    /*background-color: chartreuse;*/
    height: 105px;
    text-align: center;
        
}
#bottom #a{
    height: 50px;
    /*background-color: #87CEFA;*/
    line-height: 50px;
    font-size: 12px;
    color:rgb(130,130,130) ;
}
#bottom #a a{
    margin-left: 10px;
    margin-right: 15px;
    color:rgb(130,130,130) ;
    text-decoration: none;
}
#bottom #a a:hover{
    color: red;
    text-decoration: underline;
}

#bottom #p p{
    text-align: center;
    color:rgb(130,130,130) ;
    font-size: 12px;
}

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容

  • 1. tab列表折疊效果 html: 能源系統事業部 崗位名稱: 工作地點 崗位名...
    lilyping閱讀 1,886評論 0 1
  • 不會用代碼框,所以看著有些亂套,,,,html部分 <!DOCTYPE html> 迅雷看看 ...
    這就是個帥氣的名字閱讀 1,560評論 0 0
  • 各種純css圖標 CSS3可以實現很多漂亮的圖形,我收集了32種圖形,在下面列出。直接用CSS3畫出這些圖形,要比...
    劍殘閱讀 9,634評論 0 8
  • 本書介紹 你是不是對Django的學習感到迷茫?是不是對網上零星的教程感到絕望?是不是苦于沒有可以迅速上手的實例而...
    阡陌3536閱讀 1,332評論 0 0
  • “每個人都是一座孤島 人和人之間的心靈溝通 就是建一座橋梁 通向對方的孤島 過程不易 橋建好了,需要珍惜”
    Rennylemon閱讀 98評論 0 0