day4-京东登录界面

一、html文件



    
        
        
        京东-欢迎登录
        
        
        
        
    
    
        
        
        
        

京东不会以任何理由要求您转账汇款,谨防诈骗。

|
忘记密码?

二、css样式文件

/*(通用)*/
*{
    /*消除默认的margin*/
    margin: 0;   
    /*消除默认的padding*/
    padding: 0;
    /*让所有标签的子标签都相对自己定位*/
    position: relative;
}

/*顶部*/
#header{
    height: 100px;
    background-color: beige;
    
}
/*顶部的顶部*/
#header #top{
    height: 70px;
    background-color:white; 
}

#header #top div{
    width: 300px;
    height: 70px;
    /*脱流*/
    position: absolute;
    left: 190px;
    /*垂直居中*/
    top: 50%;
    margin-top: -30px;
    line-height: 60px;
}
#header #top #survey{
    /*布局*/
    position: absolute;
    right: 190px;
    top: 40px;
    /*去除下划线*/
    text-decoration: none;
    /*文字颜色 大小*/
    color:gray;
    font-size: 12px;
    /*添加背景图
     * background:url(图片地址) (是否平铺)repeat/norepeat x y 背景颜色
     * x坐标和y坐标对应的值,除了可以设置数字以外,也可以设置center,让背景图在x坐标和有坐标居中
     * */
    padding-left: 23px;
    background: url(../img/q-icon.png) no-repeat 0 center ;
}
#header #top #survey:hover{
    color: red;
    text-decoration: underline
}
/*顶部的底部*/
#header #bottom{
    height: 30px;
    background-color: rgb(255,248,240);
}
/*设置字的格式*/
#header #bottom p{
    /*垂直方向居中*/
    height:30px;
    line-height: 30px;
    /*水平方向居中*/
    text-align: center;
    /*设置字体大小*/
    font-size: 12px;
}
#header #bottom p img{
    /*垂直居中*/
    height:16px;
    position: absolute;
    top: 30px;
    margin-top:-22px ;
    line-height: 15px;
}
/*中间*/
#content{
    height: 430px;
    background: url(../img/bg1.png)150px center no-repeat rgb(220,45,19);
        
}
/*登录界面*/
#content #login_page{
    width: 350px;
    height: 350px;
    background-color: white;
    /*定位*/
    position: absolute;
    right: 150px;
    top: 40px;
    
}
/*提示块*/
#content #login_page #div1{
    height:30px;
    background-color: rgb(255,246,236);
}
#div1 img{
    height: 16px;
    position: absolute;
    left: 24px;
    top: 8px;
    
}
#div1 p{
    
    height: 30px;
    line-height: 30px;
    font-size: 12px;
    text-align: center;
    color: darkgray;
}
#div1 a{
    color: aqua;
    text-decoration: none;
}
#div a:hover{
    color: red;
    text-decoration: underline;
}
/*选中登录方式*/
#content #login_page #div2{
    height: 50px;
    background-color:white;
    color: rgb(220,220,220,0.6);
    /*设置求字体粗细:取值范围是100-900*/
    font-weight: 100;
}
#div2 button{
    width: 48%;
    height: 100%;
    border:0;
    font-size: 20px;
    background-color: white;
    color:rgb(60,60,60);
    
}
/*设置按钮成为焦点的状态*/
#div2 button:focus{
    color: red;
    /*按钮成为焦点默认的边款效果是outline*/
    outline: 0;
}
/*信息收集块*/
#content #login_page #div3{
    height: 220px;
    border-top: solid gainsboro 1px;
    border-bottom: solid gainsboro 1px;
}
#div3 div{
    width: 300px;
    height: 40px;
    margin-left: 25px;
    margin-top: 23px;
    border:solid black 1px ;
    
}
#div3 img{
    width: 40px;
    height: 40px;
    float: left;
}
#div3 input{
    width: 200px;
    height: 40px;
    float: left;
    border: 0;
    padding-left:10px ;
    font-size: 14px;
}
#div3 input:focus{
    outline:0;
}
/*忘记密码*/
#div3 a{
    position: absolute;
    right: 25px;
    margin-top: 10px;
    color: rgb(89,89,89);
    font-size: 12px;
    text-decoration: none;
}
#div3 a:hover{
    color: red;
    text-decoration: underline;
}
/*登录按钮*/
#div3 button{
    width: 300px;
    margin-left: 25px;
    margin-top:40px;
    height: 35px;
    
    position: absolute;
    bottom: 20px;
    background-color: red;
    border: 0;
    color: white;
    font-size: 20px;
}
/**/
#content #login_page #div4{
    /*垂直方向居中*/
    height: 40px;
    line-height: 40px;
    font-size: 8px;
    color: rgb(220,220,220,0.6);
}
#a1{
    margin-left: 20px;
    color: black;
    font-size:14px ;
    text-decoration: none;
    background: url(../img/qq.png) no-repeat 0 center white;
    padding-left: 25px;
    margin-right: 20px;
}
#a2{
    margin-left:20px ;
    color: black;
    font-size: 14px;
    text-decoration: none;
    background: url(../img/weixin.png) no-repeat 0 center white;
    padding-left: 25px;
}
#a3{
    position: absolute;
    right: 25px;
    color: rgb(165,19,23);
    font-size: 14px;
    text-decoration: none;
    background: url(../img/right.png) no-repeat 0 center white;
    padding-left: 25px;
}
#div4 #a1:hover{
    color: red;
    text-decoration: underline;
}
#div4 #a2:hover{
    color: red;
    text-decoration: underline;
}
#div4 #a3:hover{
    color: red;
    text-decoration: underline;
}
/*底部*/
#footer{
    height: 100px;
    color: darkgrey;
    
}
#footer div{
    height: 50px;
    background-color:;
    /*垂直居中*/
    text-align: center;
    /*水平居中*/
    line-height: 50px;
    
    font-size: 14px;
    color: darkgrey;
}

#footer div a{
    margin-left: 15px;
    margin-right: 15px;
    color: darkgrey;
    text-decoration: none;
    
}
#footer div a:hover{
    color: red;
    text-decoration: underline;
}

#footer p{
    color: darkgray;
    font-size: 14px;
    text-align: center;
}

三、效果

day4-京东登录界面_第1张图片

你可能感兴趣的:(day4-京东登录界面)