美文网首页
(24)day4-京东登录

(24)day4-京东登录

作者: 2333_11f6 | 来源:发表于2018-12-06 19:03 被阅读0次

4.1 css其它属性

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title></title>
    </head>
    <body>
        <!--1文字相关属性-->
        <style type="text/css">
            div{
                /*1.字体大小、颜色*/
                font-size: 20px;
                color: red;
                
                /*3.字体名字*/
                font-family: "楷体";
                
                /*4.文字加粗
                 100-400一般
                 500常规
                 600-900加粗*/
                font-weight:100;
                
                /*5.文字倾斜
                 italic倾斜
                 oblique倾斜
                 */
                /*font-style:italic;*/
                font-style: oblique;
                
                /*6.水平对齐方式
                 left
                 right
                 center
                 宽度要确定才有效
                 这个属性是针对标签中的内容(内容可以是文字,也可以是其它标签)*/
                /*text-align: right;*/
                /*text-align: center;*/
                
                /*7.文字行高:设置一行文字高度
                 与设置div高度不同,这样设置可改变内容在上下方向的位置;
                 通过设置行高和标签高度相同,让内容在上下方向居中*/
                line-height: 160px;
                
                /*8.文字装饰
                 none:去掉装饰器
                 underline:添加下划线
                 overline:上划线
                 line-through
                 是加给文字的。
                 */
                text-decoration: underline;
                /*text-decoration: line-through;*/
                
                /*9.首行缩进
                 只针对第一行有效*/
                text-indent:2em;
                
                /*10.字间距*/
                letter-spacing: 1em;
                
            }
        </style>
        <div style="background-color: yellow;">
            <p>我是一段文字gggggg</p>
            <!--<a href="">111</a>
            <a href="">111</a>
            <a href="">111</a>
            <a href="">111</a>
            <a href="">111</a>
            <a href="">111</a>-->
        </div>
        
        <hr />
        <!--列表相关属性-->
        <style type="text/css">
            /*1.定义符号样式*/
            ul{
                list-style-type: circle;
                list-style-type: none;
                list-style-type: square;
                
            /*2.定义符号图片*/
            /*list-style-image: url(img/jd.jpg);*/
            
            /*3.定义符号位置*/
            list-style-position: inside;
            }
        </style>
        <ul>
            <li>数学</li>
            <li>语文</li>
            <li>英语</li>
        </ul>
        <hr />
        <!--背景图-->
        <style type="text/css">
            #bg{
                /*1.将指定图片设置为当前标签背景*/
                background-image: url(img/校长.jpg);
                
                /*2.背景图是否平铺
                 repeat(默认):当背景图比标签小时,背景图会反复渲染,直到标签全部铺满为止*/
                /*不平铺*/
                background-repeat: no-repeat;
                
                /*3.背景图位置
                x坐标:数值/left/right/center
                y坐标:数值/top/bottom/center
                 */
                /*background-position-x: center;
                background-position-y: center;
                */
                background-position-x: 50%;
                background-position-y: 50%;
            }
        </style>
        <div id="bg" style="width: 600px;height: 500px;background-color: red;">
            
        </div>
    </body>
</html>

4.2 京东登录

html:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <!--设置网页标题-->
        <title>京东欢迎登录</title>
        <!--设置网页图标-->
        <link rel="icon" type="img/ico" href="img/jd_logo.ico"/>
        <link rel="stylesheet" type="text/css" href="css/index.css"/>
    </head>
    <body>
        <!--1.网页顶部-->
        <div id="header">
            <!--顶部-->
            <div id="top">
                <!--图片-->
                <div id="div1">
                    <a href="https://www.jd.com/"><img src="img/logo.png"/></a>
                    <img src="img/l-icon.png"/>
                </div>
                <!--调查问卷-->
                <a id="a1" target="_blank" href="https://surveys.jd.com/index.php?r=survey/index/sid/568245/lang/zh-Hans">登录页面,调查问卷</a>
            </div>
            <!--底部-->
            <div id="bottom">
                <img src="img/xx.png"/>
                <font>依据《网络安全法》,为保障您的账户安全和正常使用,
                    请尽快完成手机号验证! 新版<a target="_blank" href="http://www.baidu.com">《京东隐私政策》</a>已上线,
                    将更有利于保护您的个人隐私。</font>
            </div>
        </div>
        
        <!--2.网页中间-->
        <div id="content">
            <!--登录框-->
            <div id="login_div">
                <div id="div1">
                    <p><img src="img/xx.png"/>&emsp;&nbsp;&nbsp;京东不会以任何理由要求您转账汇款,谨防诈骗。</p>
                </div>
                <div id="div2">
                    <button id="btn1">扫码登录</button>|
                    <button id="btn2">账号登录</button>
                </div>
                <div id="div3">
                    <!--用户名、密码-->
                    <!--邮箱/用户名/已验证手机-->
                    <div id="username">
                        <img src="img/pygame.png"/>
                        <input type="text" name="name" placeholder="邮箱/用户名/已验证手机"/>
                    </div>
                    <div id="password">
                        <img src="img/password_icon.png"/>
                        <input type="password" name="password" placeholder="密码"/>
                    </div>
                    <!--忘记密码-->
                    <a target="_blank" href="https://aq.jd.com/process/findPwd?s=1">忘记密码</a>
                    <button>登&emsp;录</button>
                </div>
                <div id="div4">
                    <a href="" id="a1">QQ</a>|
                    <a href="" id="a2">微信</a>
                    <a href="" id="a3">立即注册</a>
                </div>
            </div>
        </div>
        <!--3.网页底部-->
        <div id="footer">
            <div id="top">
                <a href="http://www.baidu.com">关于我们</a>
                <a href="http://www.baidu.com">联系我们</a>
                <a href="http://www.baidu.com">人才招聘</a>
                <a href="http://www.baidu.com">商家入驻</a>
                <a href="http://www.baidu.com">广告服务</a>
                <a href="http://www.baidu.com">手机京东</a>
                <a href="http://www.baidu.com">友情链接</a>
                <a href="http://www.baidu.com">销售联盟</a>
                <a href="http://www.baidu.com">京东社区</a>
                <a href="http://www.baidu.com">京东工艺</a>
                <a href="http://www.baidu.com" id="a11">
                    English Site
                </a>
            </div>
            <div id="bottom">
                <font>Copyright © 2004-2018  京东JD.com 版权所有</font>
            </div>
        </div>
    </body>
</html>

css:

/*==============通用=================*/
*{
    /*取消所有自带的间距*/
    margin: none;
    padding: none;
    /*让当前网页中所有标签的子标签相对自己定位*/
    position: relative;
}
a{
    /*取消所有a标签的下划线*/
    text-decoration: none;
}
/*1.网页顶部*/
#header{
    height:120px;
    /*background-color: red;*/
}

/*顶部的顶部*/
#header #top{
    height: 80px;
}
/*图片*/
#header #top #div1{
    position: absolute;
    left: 186px;
    
    /*垂直居中
     当前标签高度60px*/
    top: 50%;
    margin-top: -30px;
    /*line-height: 60px;*/
}
/*调查问卷*/
#header #top #a1{
    /*定位*/
    position: absolute;
    right: 190px;
    bottom: 10px;
    
    /*文字效果*/
    font-size: 12px;
    color: rgb(150,150,150);
    
    /*背景图
     background:图片地址  是否平铺  x坐标  y坐标  背景颜色
     */
    /*文字往后挪*/
    padding-left: 22px;
    background: url(../img/q-icon.png) no-repeat 0px center rgba(0,0,0,0)
}
/*鼠标悬停时变红加下划线*/
#header #top #a1:hover{
    color: red;
    text-decoration: underline;
}

/*顶部的底部*/
#header #bottom{
    height: 40px;
    background-color: rgb(255,246,236);
    
    /*水平方向居中*/
    text-align: center;
    /*文字垂直方向居中*/
    line-height: 40px;
}

#header #bottom font{
    /*文字右移,给图片让位*/
    margin-left:20px;
    /*文字大小,颜色*/
    font-size: 13px;
    color: rgb(150,150,150);
}

#header #bottom font a{
    color: rgb(38,38,38);
}
#header #bottom font a:hover{
    text-decoration: underline;
}
#header #bottom img{
    /*图片垂直居中*/
    position: absolute;
    top:50%;
    margin-top:-8px;
}

/*2.网页中间*/
#content{
    height: 470px;
    /*background-color: yellow;*/
    /*背景图*/
    background: url(../img/bg1.png) no-repeat 20% center rgb(196,25,25);    
}
#content #login_div{
    width: 350px;
    height: 400px;
    background-color: rgb(255,246,236);
    position: absolute;
    right: 188px;
    top: 10px;  
}
#content #login_div #div1{
    height: 40px;
    background-color: rgb(255,246,236);
    line-height: 40px;
}
#content #login_div #div1 p{
    font-size: 12px;
    text-align: center;
    color: rgb(150,150,150);
}
#content #login_div #div1 p img{
    /*垂直居中*/
    position: absolute;
    top:50%;
    margin-top: -8px;
}
#content #login_div #div2{
    height: 55px;
    /*background-color: saddlebrown;*/
    /*调整竖线*/
    color: rgba(220,220,220,1);
    font-weight: 100;
    font-size: 18px;
    background-color: white;
}
#content #login_div #div2 button{
    background-color: white;
    width: 170px;
    height: 100%;
    color: rgb(83,83,83);
    /*color:white;*/
    font-size: 20px;
    border: 0;
    font-weight: 600;
}
#content #login_div #div2 button:focus{
    /*按钮成为焦点的状态,鼠标点击选中状态*/
    /*去掉outline*/
    outline: 0;
    color: rgb(215,36,50);
}

/*#content #login_div #div2 button:hover{
    color: red;
}*/

#content #login_div #div3{
    height: 255px;
    background-color: white;
    border-top: 1px solid rgba(220,220,220,0.6);
    border-bottom: 1px solid rgba(220,220,220,0.6);
}
#content #login_div #div3 #username,#content #login_div #div3 #password{
    height: 40px;
    
    position: absolute;
    left: 20px;
    right: 20px;
    top:30px;
    width: auto;
    /*background-color: red;*/
    
    border: 1px solid rgba(220,220,220,1);
}
#content #login_div #div3 #password{
    top: 90px;
}
/*输入框图片*/
#content #login_div #div3 img{
    width: 40px;
    height: 40px;
    float: left;
    border-right: 1px solid rgba(220,220,220,1);
}
/*输入框*/
#content #login_div #div3 input{
    border: 0;
    height: 38px;
    width: 250px;
    float: left;
    /*向右移动光标*/
    font-size: 12px;
    padding-left: 10px;
    /*background-color: #0000FF;*/
}
#content #login_div #div3 input:focus{
    outline: 0;
}
/*忘记密码*/
#content #login_div #div3 a{
    position: absolute;
    right: 20px;
    top: 150px;
    font-size: 13px;
    color: rgb(85,85,85);
}
#content #login_div #div3 a:hover{
    text-decoration: underline;
    color: red;
}
/*登录按钮*/
#content #login_div #div3 button{
    position: absolute;
    bottom: 30px;
    
    left:20px;
    width: 310px;
    height: 35px;
    
    border: 0;
    background-color: rgb(210,35,50);
    
    color: white;
    font-size: 20px;
}

#content #login_div #div3 button:focus{
    outline: 0;
}
#content #login_div #div3 button:active{
    border: 2px solid blueviolet;
    /*设置圆角*/
    border-radius: 3px;
    /*outline: blueviolet solid 2px;*/
}
/*第3方登录*/
#content #login_div #div4{
    height: 50px;
    line-height: 50px;
    font-size: 13px;
    /*color: rgb(83,83,83);*/
    background-color: white;
}
#content #login_div #div4 #a1{
    margin-left: 10px;
    margin-right:15px;
    
    background: url(../img/qq.png) no-repeat 0px -3px rgba(0,0,0,0);
    padding-left: 26px;
}
#content #login_div #div4 #a2{
    margin-left: 20px;
    margin-right:20px;
    
    background: url(../img/weixin.png) no-repeat 0px -3px rgba(0,0,0,0);
    padding-left: 26px;
}
#content #login_div #div4 #a3{
    position: absolute;
    right: 20px;
    
    background: url(../img/right.png) no-repeat 0px 12px rgba(0,0,0,0);
    padding-left: 26px;
    color: rgb(210,50,50);
}
#content #login_div #div4 a:hover{
    text-decoration: underline;
    color: red;
}

/*3.网页底部*/
#footer{
    height: 110px;
    background-color: white;
}
#footer #top{
    height: 50px;
    background-color: white;
    font-size: 12px;
    padding-left: 230px;
}
#footer #top a{
    line-height: 50px;
    padding-left: 15px;
    padding-right: 15px;
    border-right: 1px solid rgb(83,83,83,1);
}
#footer #top #a11{
    border-right: 0;
}
#footer #top a:hover{
    color: red;
    text-decoration: underline;
}
#footer #bottom{
    height: 20px;
    background-color:white;
    font-size: 12px;
    padding-left: 550px;
    color: rgb(83,83,83);
}

相关文章

网友评论

      本文标题:(24)day4-京东登录

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