HTML+CSS实现小米官网首页(二)

简介: HTML+CSS实现小米官网首页

HTML+CSS实现小米官网首页(一)https://developer.aliyun.com/article/1382510


CSS(login)部分源代码如下:

*{
    margin: 0;
    padding: 0;
}
a{
    text-decoration: none;
}
li{
    list-style: none;
}
body{
    background-color: #F9F9F9;
}
.top{
    width: 786px;
    height: 520px;
    background-color: white;
    margin: 0 auto;
    padding: 0 34px 30px 34px;
}
.title{
    display: block;
    width: 55px;
    height: 55px;
    background-image: url(images/mi-logo.png);
    background-color: #FF6700;
    background-position: 50%;
    margin: 0 auto;
    margin-bottom: 40px;
}
.top h4{
    display: block;
    color: #333;
    width: 786px;
    height: 45px;
    line-height: 45px;
    font-size: 30px;
    font-weight: normal;
    text-align: center;
}
.middle{
    margin: 0 0 0 130px;
    color: #757575;
}
.middle input{
    border:1px solid #757575;
}
.p{
    color:red;
    margin-left:20px;
    display:inline-block;
}
.c{
    color:red;
    margin-left:4px;
    display:inline-block;
}
.l{
    font-size:18px;
}
.d{
    display:inline;
}
.i{
    height:30px;
    width:300px;
}
.footer{
    display: block;
    height: 30px;
    margin: 100px 0 0 600px;
}
.footer li{
    float: left;
}
.footer li a ,
.footer li span {
    color: #757575;
    font-size: 14px;
}
.footer li a{
display: inline-block;
    height: 19px;
    padding: 0 10px;
    text-align: center;
}
.footer li a:hover{
    color: #FF6700;
}

CSS(message)部分源代码如下:

*{
    margin: 0px;
    padding: 0;
}
.w{
    width: 1226px;
    margin: 0 auto;
}
li{
    list-style: none;
}
a{
    color: black;
    text-decoration: none;
}
.header_middle{
    width: 100%;
    height: 40px;
    background-color: #333333;
}
.header_middle ul li{
    float:left;
    padding-right: 15px;
}
.header_middle a{
    color: #b0b0b0;
    height: 40px;
    line-height: 40px;
    font-size: 12px;
}
.header_middle a:hover{
    color: white;
}
.right{
    margin-left: 175px;
}
.shopping{
    text-align:center;
    width: 120px;
    background-color:rgba(0,0,0,.3);
}
.top_logo{
    margin-top: 20px;
    height: 78px;
}
.logo{
    float: left;
    display:block;
    width: 55px;
    height: 55px;
    background-image: url(images/mi-logo.png);
    background-color:#FF6700 ;
    background-position: 50%;
}
.list{
    float: left;
    margin-left: 190px;
}
.list li{
    float: left;
}
.list li a{
    color: #333;
    height: 55px;
    line-height: 55px;
    font-size: 16px;
    padding-right: 15px;
}
.list li a:hover{
    color:#FF6700 ;
}
.search_btn{
    display: block;
    float: right;
    width:52px ;
    height: 50px;
    border: 1px solid #e0e0e0;
    background-image: url(images/search_before.png);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: 50%;
    border-left: 0;
    padding: 0 6px;
}
.search_btn:hover{
    background-color: #FF6700;
    background-image: url(images/search_after.png);
}
.search{
    float: right;
    width:245px ;
    height: 50px;
    border: 1px solid #e0e0e0;
}
.search .search-text{
    border: 0;
    width: 100%;
    height: 100%;
    padding-left: 10px;
}
/* 中间部分开始 */
.middle{
    background-color: #F5F5F5;
}
.middle .title{
    height: 41px;
    font-size: 16px;
    color: #333;
    line-height: 41px;
}
.middle .contain{
    height: 955px;
}
.middle .contain .contain_left{
    float: left;
    width: 234px;
    height: 883px;
    background-color: white;
    padding: 36px 0;
}
.middle .contain .contain_left h3{
    width: 138px;
    height: 52px;
    font-size: 16px;
    font-weight: 400;
    line-height: 52px;
    color: #333;
    margin-left: 45px;
}
.middle .contain .contain_left li{
    width: 138px;
    padding: 6px 0;
    margin-left: 45px;
}
 a{
    font-size: 14px;
    color: #757575;
}
a:hover{
    color: #FF6700;
}
.middle .contain .contain_right{
    float: right;
    width: 882px;
    height: 192px;
    background-color: white;
    padding: 36px 48px;
}
.middle .contain .contain_right h1{
    display: block;
    height: 68px;
    font-size: 30px;
    font-weight: 400;
    line-height: 68px;
    color: #757575;
}
.middle .contain .contain_right .more_message{
    height: 57px;
    line-height: 57px;
    border-bottom: 1px solid #e0e0e0;
}
.middle .contain .contain_right .more_message li{
    float: left;
    width: 84px;
    height: 20px;
}
.sep{
    /* float: left; */
    font-family: sans-serif;
    line-height: 40px;
    font-size: 12px;
    color: #b0b0b0;
    margin-right: 10px;
    margin-left: 12px;
}
.date{
    margin-top: 30px;
    font-size: 18px;
    text-align: center;
    color: #b0b0b0;
}
.color{
    height: 80px;
    background-color: #F5F5F5;
}
/* 尾部开始 */
/* 服务模块开始 */
.tool{
    height: 330px;
}
.tool .tool_header{
height: 80px;
border-bottom: 1px solid #e0e0e0;
}
.tool .tool_header li{
    float: left;
     width: 243px;
     height: 25px;
     margin-top: 27px;
     border-left: 1px solid #e0e0e0;
}
.tool .tool_header li .pic{
    float: left;
    width: 25px;
    height: 25px;
    background-image: url(images/footer_tool1_before.png);
    background-size: 100%;
}
.tool .tool_header li a{
    display: block;
    width: 150px;
    height: 17px;
    font-size: 16px;
    color: #616161;
    padding-right: 0px;
    text-align: center;
    padding-left: 60px;
}
.tool .tool_header li a:hover{
color: #FF6700;
}
.tool_footer{
    height: 250px;
    padding: 40px 0;
}
.tool_footer ul h3{
    margin-bottom:26px;
    font-weight: 400;
}
.tool_footer ul li{
    margin-top: 10px;
}
.tool_footer ul li a{
    color: #616161;
    font-size: 12px;
}
.tool_footer ul li a:hover{
    color: #FF6700;
}
.col_links{
    width: 160px;
    float: left;
}
.col_links_last{
    float: right;
    width: 252px;
    height: 110px;
    border-left: 1px solid #e0e0e0;
    text-align: center;
}
.col_links_last p{
    margin-bottom:5px;
}
.col_links_last .phone{
color:#FF6700 ;
font-weight: 700;
font-size: 22px;
}
.phone_time{
    font-size: 12px;
    color: #616161
}
.col_links_last>a{
    display: block;
    width: 120px;
    height: 30px;
    color:#FF6700;
    margin-left: 50px;
    border:1px solid #FF6700;
}
.col_links_last>a span{
    line-height: 30px;
}
.col_links_last>a:hover{
background-color: #FF6700;
color: white;
}
.col_links_last div{
    text-align: left;
    margin-left: 50px;
    margin-top: 8px;
    font-size: 14px;
    color: #616161
}
.col_links_last div img{
    width: 13%;
}
.info_header{
    height: 89px;
}
.info_left{
    float: left;
    height: 89px;
}
.info_header .logo{
    width: 60px;
    height: 60px;
    margin-right: 10px;
    background-repeat: no-repeat;
    background-size: 100%;
    background-position: 70%;
}
.info_logo_text1 a,
.info_logo_text2,
.info_logo_text2 a,
.info_logo_text1 span{
    font-size: 12px;
}
.info_logo_text2 a:hover,
.info_logo_text1 a:hover{
    color: #FF6700;
}
.info_logo_text1 a,
.info_logo_text1 span{
    color: #757575;
}
.info_logo_text2,
.info_logo_text2 a{
    color: #b0b0b0;
}
.info_middle{
    width: 1226px;
    margin: 0 auto;
}
.info_middle .pic_first{
    margin:5px 0 0 70px;
}
.info_middle img{
    width: 85px;
    height: 28px;
}
.info_middle .pic_last{
    width: 105px;
    height: 40px;
}
.info_footer{
text-align: center;
margin-top: 30px;
}
相关文章
|
17天前
|
前端开发 JavaScript 开发工具
【HTML/CSS】入门导学篇
【HTML/CSS】入门导学篇
23 0
|
1天前
|
数据安全/隐私保护
樱花飘落官网引导页HTML源码
直接修改主文件即可,无加密无授权,测试非常好看,有樱花特效
6 1
|
8天前
|
数据采集 前端开发 网络协议
如何使用代理IP通过HTML和CSS采集数据
如何使用代理IP通过HTML和CSS采集数据
|
12天前
|
前端开发 搜索推荐 数据安全/隐私保护
HTML标签详解 HTML5+CSS3+移动web 前端开发入门笔记(四)
HTML标签详解 HTML5+CSS3+移动web 前端开发入门笔记(四)
18 1
|
12天前
|
PHP
web简易开发——通过php与HTML+css+mysql实现用户的登录,注册
web简易开发——通过php与HTML+css+mysql实现用户的登录,注册
|
1月前
|
XML 编解码 前端开发
编程笔记 html5&css&js 033 HTML SVG
编程笔记 html5&css&js 033 HTML SVG
|
19天前
|
JSON JavaScript 前端开发
js是什么、html、css
js是什么、html、css
|
20天前
|
XML 前端开发 JavaScript
css和html
【4月更文挑战第7天】css和html
13 0
|
1月前
|
前端开发 容器 内存技术
使用CSS3画出一个叮当猫HTML源码
本文教程介绍了如何使用CSS3绘制叮当猫,通过HTML结构和CSS样式逐步构建叮当猫的各个部位,如头部、脸部、脖子、身体、手脚等。代码示例展示了如何利用渐变、边框、阴影和定位技巧实现三维效果和细节特征。此外,还添加了眼珠的动画效果,让叮当猫的眼睛能够转动。整个过程适合对CSS3感兴趣的读者参考学习,以提升动态图形创作技能。
16 0
使用CSS3画出一个叮当猫HTML源码