京东首页:欢迎各位点评
html部分
<div class="top">
<ul class="clearfix">
<li>
<img src="jidongimg/close.png" alt="">
</li>
<li>
<img src="jidongimg/logo.png" alt="">
</li>
<li>
打开京东App,购物更轻松
</li>
<li>
立即打开
</li>
</ul>
</div>
<div class="content-top">
<ul class="clearfix">
<li>
<img src="jidongimg/s-btn.png" alt="">
</li>
<li>
<input type="text">
<img src="jidongimg/jd.png" alt="">
<span class="sp1">|</span>
<span class="sp2"></span>
</li>
<li>
登录
</li>
</ul>
</div>
<div class="content-line">
<div class="linea">
<ul class="clearfix">
<li>
</li>
<li>
</li>
<li>
</li>
</ul>
</div>
<div class="lineb">
<ul class="clearfix">
<li>
<img src="jidongupload/nav1.webp" alt="">
<div>京东超市</div>
</li>
<li>
<img src="jidongupload/nav2.webp" alt="">
<div>京东超市</div>
</li>
<li>
<img src="jidongupload/nav1.webp" alt="">
<div>京东超市</div>
</li>
<li>
<img src="jidongupload/nav1.webp" alt="">
<div>京东超市</div>
</li>
<li>
<img src="jidongupload/nav1.webp" alt="">
<div>京东超市</div>
</li>
</ul>
</div>
<div class="linec">
<ul class="clearfix">
<li>
<img src="jidongupload/nav3.webp" alt="">
<div>京东超市</div>
</li>
<li>
<img src="jidongupload/nav1.webp" alt="">
<div>京东超市</div>
</li>
<li>
<img src="jidongupload/nav1.webp" alt="">
<div>京东超市</div>
</li>
<li>
<img src="jidongupload/nav1.webp" alt="">
<div>京东超市</div>
</li>
<li>
<img src="jidongupload/nav1.webp" alt="">
<div>京东超市</div>
</li>
</ul>
</div>
</div>
<div class="content-bottom">
<ul class="clearfix">
<li>
</li>
<li>
</li>
<li>
</li>
</ul>
</div>
css部分
div{
/*CSS3盒子模型*/
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
*{
/*点击高亮我们需要清除清除 设置为transparent 完成透明*/
-webkit-tap-highlight-color: transparent;
}
input{
/*在移动端浏览器默认的外观在iOS上加上这个属性才能给按钮和输入框自定义样式*/
-webkit-appearance: none;
}
img,a{
/*禁用长按页面时的弹出菜单*/
-webkit-touch-callout: none;
}
ul{
margin: 0;
padding: 0;
list-style: none;
}
/* 清除浮动 */
.clearfix::after{
content: "";
display: block;
clear: both;
}
body{
width: 100%;
min-width: 320px;
max-width: 640px;
margin: 0 auto;
font-size: 14px;
color: #666;
line-height: 1.5;
}
/* 顶部 */
.top{
height: 45px;
}
.top ul li{
float: left;
line-height: 45px;
background-color: #333;
text-align: center;
color: #fff;
}
/* 每一个li */
.top ul li:nth-child(1){
width: 8%;
}
.top ul li:nth-child(1) img{
width: 10px;
}
.top ul li:nth-child(2){
width: 10%;
}
.top ul li:nth-child(2) img{
width: 30px;
vertical-align: middle;
}
.top ul li:nth-child(3){
width: 57%;
}
.top ul li:nth-child(4){
width: 25%;
}
/* 内容上部分 */
.content-top{
height: 182px;
background: url(../jidongupload/banner.dpg) no-repeat;
background-size: 100% 100%;
}
.content-top ul{
height: 45px;
}
.content-top ul li{
float: left;
line-height: 45px;
text-align: center;
color: #fff;
}
.content-top ul li:nth-child(1){
width: 10%;
}
.content-top ul li:nth-child(1) img{
width: 20px;
vertical-align: middle;
}
.content-top ul li:nth-child(2){
width: 75%;
}
.content-top ul li:nth-child(2) input{
position: relative;
width: 276px;
height: 25px;
border-radius: 12px;
outline: none;
}
.content-top ul li:nth-child(2) img{
position: absolute;
width: 20px;
left: 54px;
top: 60px;
}
.content-top ul li:nth-child(2) .sp1{
position: absolute;
left: 78px;
top: 44px;
color: #333;
}
.content-top ul li:nth-child(2) .sp2{
width: 58px;
height: 50px;
position: absolute;
top: 110px;
left: 158px;
background: url(../jidongimg/jd-sprites.png) no-repeat;
background-position: -237px 12px;
zoom: 0.5;
}
.content-top ul li:nth-child(3){
width: 15%;
}
/* 中部 */
.content-line{
height: 290px;
}
.content-line .linea ul li{
float: left;
}
.content-line .linea ul li:nth-child(1){
width: 33.3%;
height: 106px;
background: url(../jidongupload/pic11.dpg) no-repeat;
background-size: 100% 100%;
}
.content-line .linea ul li:nth-child(2){
width: 33.3%;
height: 106px;
background: url(../jidongupload/pic22.dpg) no-repeat;
background-size: 100% 100%;
}
.content-line .linea ul li:nth-child(3){
width: 33.3%;
height: 106px;
background: url(../jidongupload/pic33.dpg) no-repeat;
background-size: 100% 100%;
}
.content-line .lineb{
margin-top: 20px;
margin-bottom: 10px;
}
.content-line .lineb ul li{
float: left;
text-align: center;
}
/* linb部分 */
.content-line .lineb ul li:nth-child(1){
width: 20%;
}
.content-line .lineb ul li:nth-child(1) img{
width: 42px;
}
.content-line .lineb ul li:nth-child(2){
width: 20%;
}
.content-line .lineb ul li:nth-child(2) img{
width: 42px;
}
.content-line .lineb ul li:nth-child(3){
width: 20%;
}
.content-line .lineb ul li:nth-child(3) img{
width: 42px;
}
.content-line .lineb ul li:nth-child(4){
width: 20%;
}
.content-line .lineb ul li:nth-child(4) img{
width: 42px;
}
.content-line .lineb ul li:nth-child(5){
width: 20%;
}
.content-line .lineb ul li:nth-child(5) img{
width: 42px;
}
/* linec部分 */
.content-line .linec ul li{
float: left;
text-align: center;
}
.content-line .linec ul li:nth-child(1){
width: 20%;
}
.content-line .linec ul li:nth-child(1) img{
width: 42px;
}
.content-line .linec ul li:nth-child(2){
width: 20%;
}
.content-line .linec ul li:nth-child(2) img{
width: 42px;
}
.content-line .linec ul li:nth-child(3){
width: 20%;
}
.content-line .linec ul li:nth-child(3) img{
width: 42px;
}
.content-line .linec ul li:nth-child(4){
width: 20%;
}
.content-line .linec ul li:nth-child(4) img{
width: 42px;
}
.content-line .linec ul li:nth-child(5){
width: 20%;
}
.content-line .linec ul li:nth-child(5) img{
width: 42px;
}
/* 底部 */
.content-bottom ul li{
float: left;
}
.content-bottom ul li:nth-child(1){
width: 50%;
height: 110px;
background: url(../jidongupload/new1.dpg) no-repeat;
background-size: 100% 100%;
}
.content-bottom ul li:nth-child(2){
width: 25%;
height: 110px;
background: url(../jidongupload/new2.dpg) no-repeat;
background-size: 100% 100%;
}
.content-bottom ul li:nth-child(3){
width: 25%;
height: 110px;
background: url(../jidongupload/new3.dpg) no-repeat;
background-size: 100% 100%;
}
效果图