在我们html文件中,引入了2个css文件,分别为reset.css和login.css。下面我们就来看一下这2个css文件是如何实现布局的。

先来看一下reset.css,这里是对于整个html文件共同的元素需要统一设置的样式,

代码如下:

login.css是针对性的设置各个布局的样式

代码如下:

/*header*/

*{

-webkit-box-sizing: border-box;

-moz-box-sizing: border-box;

box-sizing: border-box;}

header{

width:100%;

height: 80px;

}

header .header-content{

box-sizing: border-box;

width: 990px;

height: 80px;

margin: 0 auto;

/*background-color: red;*/

}

header .header-content .logo{

float: left;

width: 160px;

height: 60px;

background: url("../image/icon.png") no-repeat 0 15px;

}

header .header-content span{

float: left;

font-size: 24px;

padding-left: 30px;

margin-top: 20px;

}

header .header-content .login{

float: right;

font-size: 12px;

margin-top: 55px;

padding-bottom: 5px;

font-family: Arial,Verdana,"\5b8b\4f53";

}

header .header-content .login i{

display: inline-block;

width: 18px;

height: 16px;

margin: 0 5px;

background: url("../image/msg-icon.png") no-repeat ;

}

header .header-content .login a{

color: #999;

position: relative;

top: -5px;

}

header .header-content .login a:hover {

color: #E4393C;

text-decoration: underline;

}

main{

width:100%;

height: 475px;

background-color: #E8C99A;

position: relative;

}

main section{

width: 990px;

height:100%;

margin:  0 auto;

background: url("../image/loginBg.jpg")no-repeat 0 0 ;

}

main section .login-content{

width: 346px;

height: 346px;

padding: 20px;

float: right;

top: 40px;  ;

background: #fff;

position: relative;

color: #666;

}

main section .login-content-top{

width:100%;

height: 55px;

border-bottom: 1px solid #f4f4f4;

position: absolute;

top: 0;

left:0;

}

main section .login-content-top a:hover,main section .login-content-top a:nth-child(2) {

font-weight: bold;

color: #e4393c;

}

main section .login-content-top a{

-webkit-box-sizing: border-box;

-moz-box-sizing: border-box;

box-sizing: border-box;

float: left;

width: 50%;

height: 100%;

padding: 0 20px;

text-align: center;

line-height: 55px;

color: #666;

font-size: 18px;

}

main section .login-content-notice{

-webkit-box-sizing: border-box;

-moz-box-sizing: border-box;

box-sizing: border-box;

width: 100%;

height: 23px;

position: relative;

background: #fef4e5;

color: #666;

margin: 40px auto 5px;

padding-left: 40px;

border: 1px solid #f6c090;

font-size: 12px;

line-height: 23px;

}

main section .login-content-notice i{

display: inline-block;

width: 16px;

height: 17px;

position: absolute;

left: 10px;

top: 3px;

background: url("../image/pwd-icons.png")no-repeat  -104px -24px;

}

main section form{

width: 100%;

}

main section form .form-item{

border: 1px solid #bdbdbd;

height: 38px;

width: 100%;

margin-bottom: 20px;

position: relative;

}

main section form .form-item label{

position: absolute;

top: 0;

left: 0px;

width: 38px;

height: 36px;

border-right: 1px solid #bdbdbd;

}

main section form .form-item input{

height: 100%;

width:100%;

padding-left: 45px;

color: #666;

border: none;

}

main section form .form-item:nth-child(1) label{

background: url("../image/pwd-icons.png") no-repeat ;

}

main section form .form-item:nth-child(2) label{

background: url("../image/pwd-icons.png") no-repeat -48px 0;

}

main section form .form-check{

font-size: 12px;

}

main section form .form-check label{

margin-left: 5px;

vertical-align: top;

}

main section form .form-check a{

float: right;

color: #666;

}

main section form .form-check a:hover{

color: #E4393C;

text-decoration: underline;

}

main section form input[type = submit]{

width:100%;

height: 31px;

background: #e4393c;

color: #ffffff;

font-size: 18px;

word-spacing: 1em;

border: 1px solid #e85356;

margin-top: 15px;

}

main section .login-content-bottom{

width:100%;

position: absolute;

bottom:0;

left: 0;

padding: 0 18px;

line-height: 50px;

border-top: 1px solid #f4f4f4;

background-color: #fcfcfc;

}

main section .login-content-bottom a{

font-size: 12px;

}

main section .login-content-bottom span{

padding-left: 1px;

margin: 0 5px;

font-size: 10px;

background-color: #999;

}

main section .login-content-bottom a i{

width: 19px;

height: 18px;

display: inline-block;

position: relative;

top: 5px;

}

main section .login-content-bottom a:nth-child(1) i{

margin-right: 5px;

background: url("../image/QQ-weixin.png") no-repeat;

}

main section .login-content-bottom a:nth-child(3) i{

margin-right: 5px;

background: url("../image/QQ-weixin.png") no-repeat -20px 0;

}

main section .login-content-bottom a:nth-child(6){

float: right;

}

main section .login-content-bottom a:nth-child(6) i{

margin-right: 5px;

background: url("../image/pwd-icons.png")-104px -75px no-repeat;;

}

main section .login-content-bottom a:hover {

color: #e4393c;

text-decoration: underline;

}

/*footer*/

footer{

font-size: 12px;

text-align: center;

border-top: solid 1px #e6e6e6;

color: #999;

padding-bottom: 30px;

}

footer p a{

font-size: 12px;

text-align: center;

color: #999;

}

footer p:nth-child(1){

padding-top: 30px;

padding-bottom: 15px;

}

footer p span{

padding-left: 1px;

margin: 0 10px;

font-size: 10px;

background-color: #999;

}

用html5做京东登录框,使用HTML5搭建京东登录界面(二)相关推荐

  1. 如何取消windows XP登录框,让其自动登录

    如何取消windows XP登录框,让其自动登录 第一种方法 在Windows XP中单击"开始→运行" 输入 rundll32 netplwiz.dll,UsersRunDll ...

  2. html5做密码形式的游戏,html5仿支付宝密码框的实现代码

    废话不多说了,直接给大家贴代码了,具体代码所示: 仿支付宝密码框-移动端测 *{ margin: 0; padding: 0; } body { padding: 50px; } .clearfix: ...

  3. 用html5做一条线,使用HTML5 canvas绘制线条的方法

    使用HTML5 canvas绘制线条的方法 发布时间:2020-08-29 11:24:23 来源:亿速云 阅读:96 作者:小新 这篇文章主要介绍了使用HTML5 canvas绘制线条的方法,具有一 ...

  4. 用html5做淡出淡入效果,在Html5 canvas中淡入淡出

    我已经有了一个图像的画布,我想淡入淡出图像不断.我已经使用上面的代码:在Html5 canvas中淡入淡出 var canvas; var context; var ga = 0.0; var tim ...

  5. html5做一个展示页面,基于HTML5的WebGL实现json和echarts图表展现在同一个界面

    突然有个想法,如果能把一些用到不同的知识点放到同一个界面上,并且放到一个盒子里,这样我如果要看什么东西就可以很直接显示出来,而且这个盒子一定要能打开.我用HT实现了我的想法,代码一百多行,这么少的代码 ...

  6. 用html5做一个简单的作品,html5 canvas 简单画板实现代码

    canvas简单画板 canvas简单画板 提示:您可以先修改部分代码再运行

  7. html写登录框中的字,一个登录界面的PS设计和HTML/CSS实现

    这样的登录界面可用在网站.桌面软件.Web软件等上面,你可以根据自己的需求改变界面配色.好的,先看看界面最终设计的效果: 1.创建登录界面的背景 在Photoshop中,选择"圆角矩形工具& ...

  8. axure动态登录和html5,Axure8原型设计实战案例:如何实现登录功能?

    登录功能是一个非常常见的功能,几乎所有的产品都有登录功能,登录功能可以很简单,也可以非常复杂.我们在用axure做产品原型设计的时候,都会涉及到登录功能,那么,登录功能是怎么设计出来的呢? 本文和大家 ...

  9. Vue前端项目-登录组件-登录框界面

    目录 1.登录框组件设计 1.1 表单元素组件注册 1.2 登录组件的结构和样式 2.Icon 图标 2.1 拷贝 font 文件夹到 asserts 目录 2.2 引入 font 的 css 样式 ...

  10. 2023-01-26 JS设计模式-单例模式:单例模式的原理和实现,懒汉模式和饿汉模式,单例模式实现登录框

    文章目录 1.什么是单例模式? 介绍 特点 结构 2.如何实现一个单例模式? 思路 实现代码 3.单例模式的优缺点 4.懒汉模式和饿汉模式 懒汉模式:一开始不会实例化,什么时候用才new出来实例化 饿 ...

最新文章

  1. 电路非门_【连载】电路和维修基础之门电路、转换器
  2. 成功解决UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd3 in position 238: invalid continuation b
  3. 信息化建设规划_苏交集团施工企业信息化建设规划分享会顺利召开
  4. 4.Python的不堪一击到初学乍练(列表,元组)
  5. lts安装 rust ubuntu_一起学Rust编程「1」:开发环境
  6. 《剑指Offer》24:反转链表
  7. beginnersbook C 语言示例·翻译完成 | ApacheCN
  8. unity UI如何开启(显示)或者关闭(隐藏)Panel界面最好?
  9. 【渝粤教育】电大中专Office办公软件_1作业 题库
  10. instead of触发器实现复杂视图dml和应用逻辑
  11. 手机html5跑分,吊炸天的Chrome55内核来袭 360手机浏览器成“跑分王”
  12. matlab实训心得,沟通实训心得体会
  13. LeetCode contest 182 5369. 统计作战单位数
  14. 【祥哥带你玩HoloLens开发】了解如何实现远程主机为HoloLens实时渲染
  15. 矿大课表ics文件生成小工具
  16. tig - 必知的git界面化工具
  17. 视觉打标软件 在线视觉打标系统 1.金橙子控制板卡 2.自主研发的定位系统
  18. mac终端命令(苹果终端命令)
  19. JAVA:(拉丁正方形)
  20. MTC生态最新的落地应用,连环竞技场即将耀世而来

热门文章

  1. 一次函数的斜率公式_一次函数斜率公式是什么?
  2. 个人投资者金融期货开户的条件
  3. SmartBi参数传值与JS报表宏及Mysql数据集特殊功能总结
  4. Git合并两个远程代码库
  5. 如何从包含代码库的.repo目录恢复出代码
  6. Android Socket 服务器ServerSocket发数据到客户端
  7. 计算机自带仿真软件,crt软件(电脑终端仿真工具)V8.5.4 最新版
  8. golang tailf日志组件的基本使用
  9. 卜若的代码笔记-机器学习基础-UCI数据库简介与Iris数据集分析
  10. 我的Windows初始安装软件(技术型办公用电脑)