效果展示
代码
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>手机选购</title>
<link href="main.css" rel="stylesheet">
</head>
<body>
<div id="mr-content">
<div class="mr-top">
<h2>手机</h2>
<p class="mr-p1">手机风暴</p>
<p class="mr-p2">></p>
<p class="mr-p2">更多手机</p>
<p class="mr-p2">OPPO</p>
<p class="mr-p2">联想</p>
<p class="mr-p2">魅族</p>
<p class="mr-p2">乐视</p>
<p class="mr-p2">荣耀</p>
<p class="mr-p2">小米</p>
</div>
<img src="images/8-1.jpg" alt="" class="mr-img1">
<div class="mr-right">
<a href="images/link.png" target="_blank"><img src="images/8-1a.jpg" alt="" att="a"></a>
<a href="images/link.png" target="_blank"><img src="images/8-1b.jpg" alt="" att="b"></a>
<a href="images/link.png" target="_blank"><img src="images/8-1c.jpg" alt="" att="c"></a>
<a href="images/link.png" target="_blank"><img src="images/8-1d.jpg" alt="" att="d"></a>
<a href="images/link.png" target="_blank"><img src="images/8-1e.jpg" alt="" att="e"></a>
<img src="images/8-1g.jpg" alt="" class="mr-car1">
<img src="images/8-1g.jpg" alt="" class="mr-car2">
<img src="images/8-1g.jpg" alt="" class="mr-car3">
<img src="images/8-1g.jpg" alt="" class="mr-car4">
<img src="images/8-1g.jpg" alt="" class="mr-car5">
<p class="mr-price1">OPPO R9 Plus<br/><span>3499.00</span></p>
<p class="mr-price2">vivo Xplay6<br/><span>4498.00</span></p>
<p class="mr-price3">Apple iPhone 7<br/><span>5199.00</span></p>
<p class="mr-price4">360 NS4<br/><span>1249.00</span></p>
<p class="mr-price5">小米 Note4<br/><span>1099.00</span></p>
</div>
</div>
</body>
</html>
css
#mr-content{
width:1200px;
height:540px;
border:1px solid red;
margin:0 auto;
text-align:left;
font-size: 12px;
}
.mr-top{
width:1200px;
height:45px;
border-bottom:2px solid;
margin:0 auto;
}
h2{
display:inline-block;
color:#333333;
}
.mr-top .mr-p1{
font-size:10px;
color:#666;
}
.mr-top .mr-p2{
display:inline-block;
font-size:10px;
color:#666;
float:right;
padding:10px 20px 0 0;
}
.mr-img1{
float:left;
}
.mr-right{
width:960px;
height:527px;
float:left;
position:relative;
}
[att=a]{
width:180px;
height:182px;
position:absolute;
left:140px;
top:20px;
}
[att=b]{
width:180px;
height:182px;
position:absolute;
left:700px;
top:20px;
}
[att=c]{
width:180px;
height:182px;
position:absolute;
left:400px;
top:180px;
}
[att=d]{
width:180px;
height:182px;
position:absolute;
left:100px;
top:250px;
}
[att=e]{
width:180px;
height:182px;
position:absolute;
left:650px;
top:230px;
}
.mr-car1{
position:absolute;
left:330px;
top:170px;
}
.mr-car2{
position:absolute;
left:890px;
top:170px;
}
.mr-car3{
position:absolute;
left:590px;
top:330px;
}
.mr-car4{
position:absolute;
left:290px;
top:380px;
}
.mr-car5{
position:absolute;
left:840px;
top:380px;
}
.mr-price1{
position: absolute;
left:50px;
top:170px;
}
.mr-price2{
position: absolute;
left:620px;
top:170px;
}
.mr-price3{
position: absolute;
left:0px;
top:350px;
}
.mr-price4{
position: absolute;
left:350px;
top:300px;
}
.mr-price5{
position: absolute;
left:560px;
top:360px;
}
span{
font-size: 10px;
color: #706A6A;
}