京东登录页面

index.html

<!-- index-html是网站的首页对应的html文件 -->
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <!-- 设置网页标题 -->
        <title>京东-欢迎登录</title>
        <!-- 设置网页图标 -->
        <link rel="icon" type="image/ico" href="img/yyy.png">
        
        <link rel="stylesheet" type="text/css" href="css/index.css">
        
        
        
    </head>
    
    <body>
        <!-- ===============顶部=============== -->
        <div id="header">
            <!-- 顶部的顶部 -->
            <div id="top">
                <div>
                    <a href="https://www.jd.com/"><img src="img/logo.png"/></a>
                    <img src="img/l-icon.png"/>
                    
                </div>
                <a id="surver" target="_blank" href="https://surveys.jd.com/index.php?r=survey/index/sid/568245/lang/zh-Hans">登录页面, 调查问卷</a>
            </div>
            <!-- 顶部的底部 -->
            <div id="bottom">
                <p><img src="img/warning.png"/> &nbsp;&emsp;&emsp;依据《网络安全法》,为保障您的账户安全和正常使用,请尽快完成手机号验证! 新版<a target="_black" href="https://about.jd.com/privacy/">《京东隐私政策》</a>已上线,将更有利于保护您的个人隐私</p>
            
            </div>
            
        </div>
        <!-- ===============中间=============== -->
        <div id="content">
            <div id="login_page">
                <!-- 提示栏 -->
                <div id="div1">
                    
                    <p><img src="img/xx.png" >&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="username" value="" placeholder="邮箱/用户名/已验证手机">
                    </div>
                    <!-- 密码 -->
                    <div id="password">
                        <img src="img/password_icon.png">
                        <input type="password" name="password" value="" placeholder="密码">
                    </div>
                    <a href="">忘记密码</a>
                    <button id="but3">登&emsp;录</button>
                </div>
                <!-- 注册和第三方登录块 -->
                <div id="div4">
                    <a id="a1" href="" class="a1">QQ</a>|
                    <a id="a2" href="" class="a1">微信</a>
                    <a id="a3" href="">立即注册</a>
                </div>
            </div>
            
        </div>
        <!-- ===============底部=============== -->
        <div id="footer">
            <div>
                <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="">English Site</a>
                
            </div>
            <p>www.爱你们.com</p>
        </div>
        
    </body>
</html>

index.css

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





/* ===============顶部=============== */
#header{
    height: 130px;
    background-color: seagreen;
}

/* <!-- 顶部的顶部 --> */
#header #top{
    height: 80px;
    background-color: white;
}
#header #top div{
    width: 292px;
    height: 80px;
    /* background-color: hotpink; */
    
    /* 相对定位-会让标签脱流 */
    position: absolute;
    left: 188px;
    
    /* 垂直居中 */
    top: 50%;
    margin-top: -30px;
    line-height: 60px;
}
#header #top #surver{
    /* 布局 */
    position: absolute;
    right: 187px;
    bottom: 15px;
    
    /* 设置字体 */
    color: rgb(180, 180, 180);
    font-size: 12px;
    
    /* 去掉下环线 */
    text-decoration: none;
    
    /* 添加背景图*/
    /* background: url(图片地址) repeat/no-repeat  x y 背景颜色 */
    /* x,y: x坐标和y坐标对应的值,除了可以设置数字值以外还可以设置center,让背景图在x方向和y方向居中
     */
    padding-left: 25px;
    background:url(../img/q-icon.png) no-repeat 0 center white;


}
#header #top #surver:hover{
    color: red;
    text-decoration: underline;
}

/* <!-- 顶部的底部 --> */
#header #bottom{
    height: 50px;
    background-color: rgb(255,246,236);
}
#header #bottom{
    /* 垂直方向居中 */
    height: 50px;
    line-height: 50px;
    
    /* 水平方向居中 */
    text-align: center;
    /* 设置字体 */
    color: rgb(180,180,180);
    font-size: 12px;
    
}
#header #bottom p img{
    /* 垂直居中 */
    height: 25px;
    position: absolute;
    top: 50%;
    margin-top: -12px;
    line-height: -15px;
}
#header #bottom p a{
    color: rgb(30,30,30);
    /* 去掉下划线 */
    text-decoration: none;
}
#header #bottom p a:hover{
    /* 添加下划线 */
    text-decoration: underline;
}

 /* ===============中间=============== */
#content{
    height: 470px;
    /* 添加背景图 以及背景颜色*/
    background: url(../img/bg2.png)no-repeat 100px center rgb(77,157,254);
}
#content #login_page{
    height: 400px;
    width: 350px;
    background-color: white;
    
    /* 定位 */
    position: absolute;
    right: 150px;
    top: 20px;
}
/* 提示块 */
#content #login_page #div1{
    height: 40px;
    background-color: rgb(255,246,236);
}
#content #login_page #div1 p img{
    /* 垂直居中 */
    height: 16px;
    position: absolute;
    /* 水平居中 */
    margin-top: 12px;
    right: 305px;
    
}

#content #login_page #div1 p{
    /* 垂直居中 */
    height: 40px;
    line-height: 40px;
    /* 水平居中 */
    text-align: center;
    font-size: 12px;
    color: rgb(180,180,180);
    /* 设置字体粗细: 取值范围100~900 */
    font-weigth: 100;
}

/* 选中登录方式 */
#content #login_page #div2{
    height: 60px;
    /* background: rgb(0,0,0); */
    
    color: rgb(220, 220, 220, 0.6)
}
#content #login_page #div2 button{
    width: 48%;
    height: 100%;
    background-color: white;
    border: 0;
    
    font-size: 18px;
    color: rgb(60, 60, 60);
}
#content #login_page #div2 button:focus{
    color: red;
    /* 按钮成为焦点默认的边框效果是outline */
    outline: 0;
}

/* 信息收集块 */
#content #login_page #div3{
    height: 250px;
    background-color: white;
    /* 设置边框 */
    border-top: solid rgba(220, 220, 220, 0.6) 1px;
    border-bottom: solid rgba(220, 220, 220, 0.6) 1px;
    
}
#content #login_page #div3 div{

    width: 300px;
    height: 40px;
    margin-left: 25px;
    margin-top: 23px;
    
    border: solid rgb(170, 170, 170) 1px;
}
#content #login_page #div3 #username{
    margin-top: 35px;
}
#content #login_page #div3 div img{
    width: 40px;
    height: 40px;
    float: left;
    
    border-right: solid rgb(170, 170, 170) 1px;
}

/* 输入框 */
#content #login_page #div3 div input{
    height: 40px;
    width: 245px;
    
    border: 0;
    float: left;
    
    padding-left: 10px;
    
    font-size: 15px;
}
#content #login_page #div3 div input:focus{
    outline: 0;
}
#content #login_page #div3 a{
    position: absolute;
    right: 25px;
    margin-top: 20px;
    
    color: rgb(130,130,130);
    font-size: 12px;
    
    text-decoration: none;
}
#content #login_page #div3 a:hover{
    color: red;
    text-decoration: underline;
}

/* 登录按钮 */
#content #login_page #div3 button{
    width: 300px;
    margin-left: 25px;
    height: 35px;
    
    position: absolute;
    bottom: 20px;
    background-color: rgb(219, 34, 46);
    border: none;
    
    color: white;
    font-size: 20px;
}


#content #login_page #div4{
    /* 垂直方向居中 */
    height: 50px;
    line-height: 50px;
    font-size: 10px;
    color: rgb(220,220,220,0.8);
}
#content #login_page #div4 #a1{
    margin-left: 25px;
    margin-right: 15px;
    
    color: rgb(89,89,89);
    
    padding-left: 25px;
    
    background: url(../img/qq.png) no-repeat 0 center white;
}
#content #login_page #div4 #a2{
    margin-left: 5px;
    
    color: rgb(89,89,89);
    
    padding-left: 25px;
    
    background: url(../img/weixin.png) no-repeat 0 center white;
}
#content #login_page #div4 #a3{
    position: absolute;
    right: 25px;
    
    color: rgb(165,19,23);
    font-size: 12px;
    padding-left: 25px;
    
    background: url(../img/right.png) no-repeat 0 center rgb(0,0,0,0);
}
#content #login_page #div4 a{
    text-decoration: none;
}
#content #login_page #div4 #a1:hover{
    color: red;
    text-decoration: underline;
}
#content #login_page #div4 #a2:hover{
    color: red;
    text-decoration: underline;
}
#content #login_page #div4 #a3:hover{
    color: red;
    text-decoration: underline;
}

 /* ===============底部=============== */
 #footer{
     height: 105px;
     background-color: white;
 }
 #footer div{
     height: 50px;
     background-color: white;
     
     /* 水平居中 */
     text-align: center;
     /* 垂直居中 */
     line-height: 50px;
     font-size: 13px;
     color: rgb(89,89,89);
     
 }
 #footer div a{
    margin-left: 10px;
    margin-right: 10px;
    
    color: rgb(89,89,89);
    text-decoration: none;
 }
 #footer div a:hover{
     color: red;
     text-decoration: underline;
 }
 #footer p{
     color: rgb(89,89,89);
     font-size: 13px;
     /* 水平居中 */
     text-align: center;

     
 }

运行结果如下:

image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 159,716评论 4 364
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,558评论 1 294
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 109,431评论 0 244
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 44,127评论 0 209
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,511评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,692评论 1 222
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,915评论 2 313
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,664评论 0 202
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,412评论 1 246
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,616评论 2 245
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,105评论 1 260
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,424评论 2 254
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,098评论 3 238
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,096评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,869评论 0 197
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,748评论 2 276
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,641评论 2 271

推荐阅读更多精彩内容