目標(biāo)圖片:
html:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/parter7.css" />
<title></title>
</head>
<body>
<div class="demo">
<div class="top">
<img src="img/parter7-01.png" />
<p class="p1">太平洋網(wǎng)絡(luò)推薦</p>
<div class="xiaogezi">
<p>居家網(wǎng)</p>
<div class="lvse3px"></div>
</div>
<div class="xiaogezi">
<p>親子網(wǎng)</p>
<div class="huangse3px"></div>
</div>
<div class="xiaogezi">
<p>時尚網(wǎng)</p>
<div class="fense3px"></div>
</div>
<div class="xiaogezi">
<p>汽車網(wǎng)</p>
<div class="juse3px"></div>
</div>
<div class="xiaogezi">
<p>電腦網(wǎng)</p>
<div class="lanse3px"></div>
</div>
</div>
<div class="bottom">
<div class="left">
<img src="img/parter7-02.png" />
<ul class="xulleft">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<div class="md">
<p class="bottomP1">汽車資訊</p>
<p class="bottomP2">汽車商城</p>
<div class="md_left">
<div class="wunai">
<img src="img/parter7-05.png" />
<p>廣汽菲克Jeep</p>
</div>
<ul class="md_ul">
<li>
<div class="hui3px"></div>軒逸最高優(yōu)惠3.1萬</li>
<li>
<div class="hui3px"></div>大眾Polo最高優(yōu)惠0.8萬</li>
</ul>
</div>
<div class="md_right">
<p class="md_right_p1">Jeep75周年慶 0元開走Jeep</p>
<p class="md_right_p2">活動時間4月30日</p>
<p class="md_right_p3">共有<span>300</span>人報名</p>
<input type="submit" class="submit" value="我要參加" />
<ul class="md_ul">
<li>
<div class="hui3px"></div>帕薩特最高優(yōu)惠2.5萬</li>
<li>
<div class="hui3px"></div>寶來最高優(yōu)惠1.15萬</li>
</ul>
</div>
</div>
<div class="right">
<p class="right_P">新車推薦</p>
<div class="tupian">
<img src="img/parter7-06.png">
<p>上汽通用雪佛蘭探界者</p>
</div>
<ul class="right_ul">
<li>
<div class="hui3px"></div>帕薩特最高優(yōu)惠2.5萬</li>
<li>
<div class="hui3px"></div>寶來最高優(yōu)惠1.15萬</li>
</ul>
<div class="tupian1">
<img src="img/parter7-07.png">
<p>東風(fēng)日產(chǎn)新款奇駿</p>
</div>
<ul class="lastul">
<li>
<div class="hui3px"></div>英菲尼迪新款Q60上市</li>
<li>
<div class="hui3px"></div>2017款東南V5菱致上市</li>
</ul>
</div>
</div>
</div>
</body>
</html>
CSS:
* {
padding: 0;
margin: 0;
}
.demo {
margin: 200px auto;
width: 1120px;
height: 313px;
/*background: salmon;*/
}
.top {
width: 1110px;
height: 52px;
background: white;
margin: 0 auto;
border-bottom: 3px solid #e5e5e5;
z-index: 1;
}
.top>img {
margin: 14px 0 0 10px;
float: left;
}
.p1 {
font-family: "微軟雅黑";
font-size: 27px;
line-height: 27px;
height: 27px;
color: #0077dd;
float: left;
margin: 14px 0 0 5px;
}
.xiaogezi {
width: 54px;
height: 24px;
/*background: skyblue;*/
float: right;
margin-top: 28px;
margin-left: 2px;
z-index: 2;
position: relative;
}
.xiaogezi>p {
font-family: "微軟雅黑";
font-size: 12px;
height: 12px;
line-height: 12px;
text-align: center;
color: #333333;
cursor: pointer;
}
.lvse3px {
background: #77c210;
width: 100%;
height: 3px;
float: left;
position: absolute;
bottom: -3px;
}
.huangse3px {
background: #ffd15f;
width: 100%;
height: 3px;
float: left;
position: absolute;
bottom: -3px;
}
.fense3px {
background: #eb5da7;
width: 100%;
height: 3px;
float: left;
position: absolute;
bottom: -3px;
}
.juse3px {
background: #ff954d;
width: 100%;
height: 3px;
float: left;
position: absolute;
bottom: -3px;
}
.lanse3px {
background: #559eea;
width: 100%;
height: 3px;
float: left;
position: absolute;
bottom: -3px;
}
.bottom {
width: 1110px;
height: 243px;
/*background: slateblue;*/
margin: 0 auto;
}
.left {
float: left;
width: 350px;
height: 222px;
background: white;
margin-top: 20px;
}
.left>img {
width: 350px;
height: 200px;
}
.xulleft {}
.xulleft>li {
list-style: none;
width: 12px;
height: 12px;
background: #e5e5e5;
border-radius: 50%;
float: left;
cursor: pointer;
margin-right: 5px;
}
.xulleft>li:first-child {
margin-left: 133px;
}
.xulleft>li:hover {
background: #288bde;
}
.md {
width: 348px;
height: 220px;
background: white;
float: left;
margin-top: 21px;
margin-left: 30px;
position: relative;
}
.bottomP1 {
float: left;
font-family: "微軟雅黑";
font-size: 15px;
height: 15px;
line-height: 15px;
color: #999999;
margin-top: 5px;
}
.bottomP2 {
float: left;
font-family: "微軟雅黑";
font-size: 19px;
height: 19px;
line-height: 19px;
color: #0077dd;
margin-left: 19px;
}
.md_left {
width: 160px;
height: 180px;
/*background: seagreen;*/
float: left;
position: absolute;
top: 40px;
}
.wunai {
position: relative;
width: 160px;
height: 120px;
overflow: hidden;
}
.wunai>img {
width: 160px;
height: 120px;
vertical-align: top;
}
.wunai>p {
width: 160px;
height: 120px;
background: rgba(0, 0, 0, 0.4);
/*color: floralwhite;*/
text-align: center;
font-family: "微軟雅黑";
font-size: 12px;
position: absolute;
top: 90px;
line-height: 30px;
transition: top 1s;
color: #FFFFFF;
}
.wunai:hover>p {
top: 0;
}
.md_ul {
float: left;
position: relative;
}
.md_ul>li {
list-style: none;
font-family: "微軟雅黑";
font-size: 12px;
height: 12px;
line-height: 12px;
float: left;
margin-top: 18px;
position: relative;
}
.hui3px {
width: 3px;
height: 3px;
background: #dbdbdb;
margin-top: 4px;
margin-right: 7px;
float: left;
}
.md_right {
width: 168px;
height: 180px;
/*background: seagreen;*/
position: absolute;
right: 0;
top: 40px;
}
.md_right_p1 {
font-family: "微軟雅黑";
font-size: 15px;
height: 15px;
line-height: 21px;
font-weight: 600;
}
.md_right_p2 {
font-family: "微軟雅黑";
font-size: 12px;
height: 12px;
line-height: 12px;
margin-top: 37px;
color: #333333;
}
.md_right_p3 {
font-family: "微軟雅黑";
font-size: 12px;
height: 12px;
line-height: 12px;
margin-top: 10px;
color: #333333;
}
.submit {
width: 90px;
height: 25px;
background: #ff8800;
border: 0;
cursor: pointer;
color: #ffffff;
border-radius: 3px;
margin-top: 9px;
}
.right {
width: 330px;
height: 221px;
/*background: seagreen;*/
float: right;
margin-top: 20px;
position: relative;
}
.right_P {
font-family: "微軟雅黑";
font-size: 20px;
line-height: 20px;
height: 20px;
color: #0077dd;
float: left;
}
.tupian {
width: 160px;
height: 120px;
margin-top: 40px;
position: relative;
overflow: hidden;
}
.tupian>img {
width: 160px;
height: 120px;
vertical-align: top;
}
.tupian>p {
width: 160px;
height: 120px;
background: rgba(0, 0, 0, 0.4);
color: #FFFFFF;
font-family: "微軟雅黑";
font-size: 12px;
line-height: 30px;
text-align: center;
position: absolute;
top: 90px;
transition: top 1s;
}
.tupian:hover>p {
top: 0;
}
.right_ul {
/*float: left;*/
}
.right_ul>li {
list-style: none;
font-family: "微軟雅黑";
font-size: 12px;
line-height: 12px;
margin-top: 18px;
}
.tupian1 {
width: 160px;
height: 120px;
margin-top: 40px;
position: relative;
overflow: hidden;
left: 170px;
bottom: 220px;
}
.tupian1>img {
width: 160px;
height: 120px;
vertical-align: top;
}
.tupian1>p {
width: 160px;
height: 120px;
background: rgba(0, 0, 0, 0.4);
color: #FFFFFF;
font-family: "微軟雅黑";
font-size: 12px;
line-height: 30px;
text-align: center;
position: absolute;
top: 90px;
transition: top 1s;
}
.tupian1:hover>p {
top: 0;
}
.lastul {
position: absolute;
top: 158px;
left: 170px;
}
.lastul>li {
list-style: none;
font-family: "微軟雅黑";
font-size: 12px;
line-height: 12px;
margin-top: 18px;
}
運行結(jié)果