此网页可兼容火狐,谷歌IE6及以上浏览器
网页代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>polo360</title>
<link rel="stylesheet" type="text/css" href="css/reset.css">
<link rel="stylesheet" type="text/css" href="css/cs.css">
</head>
<body>
<div class="header w">
<!-- 导航条 -->
<ul class="nav">
<li>
<a href="#">HOME</a>
<p>Back to home</p>
</li>
<li>
<a href="#">PRODUCTS</a>
<p>What we have for you</p>
</li>
<li>
<a href="#">SERVICES</a>
<p>Things we do</p>
</li>
<li>
<a href="#">BLOG</a>
<p>Follow our updates</p>
</li>
<li>
<a href="#">CONTACT</a>
<p>Ways to reach us</p>
</li>
</ul>
<div class="logo">
<a href="#">
<img src="img/logo.png" alt="logo">
</a>
</div>
</div>
<!-- header结束 -->
<!-- banner开始 -->
<div class="banner w">
<img src="img/banner/banner.png" alt="banner">
<div class="pointerDiv">
<a href="#"></a>
<a class="active" href="#"></a>
<a href="#"></a>
<a href="#"></a>
<a href="#"></a>
</div>
</div>
<!-- banner结束 -->
<!-- content开始 -->
<div class="content w clearfix">
<h1>Lorem ipsum dolor sit amet, consectetur adipisicing elit</h1>
<div class="pl">
<h2>Perfect Logic</h2>
<p class="p1">All you want your website to do.</p>
<div class="imgDiv">
<img src="img/pic/pic1.jpg" alt="1">
</div>
<p class="p2">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</p>
<a href="#" class="lm">Learn More</a>
</div>
<div class="cs">
<h2>Complete Solution</h2>
<p class="p1">A tool anything and everything you can think</p>
<div class="imgDiv">
<img src="img/pic/pic2.jpg" alt="1">
</div>
<p class="p2">Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciun tdolore magnam aliquam quaerat voluptatem.</p>
<a href="#" class="lm">Learn More</a>
</div>
<div class="uc">
<h2>Uber Culture</h2>
<p class="p1">Fresh. Modern and ready for future</p>
<div class="imgDiv">
<img src="img/pic/pic3.jpg" alt="1">
</div>
<p class="p2">Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>
<a href="#" class="lm">Learn More</a>
</div>
</div>
<!-- content结束 -->
<!-- contact开始 -->
<div class="contect w clearfix">
<div class="sc">
<h2>Social Connection</h2>
<p class="p1">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium</p>
<div class="icon">
<a href="#"><img src="img/rss.png" alt="rss">
</a><a href="#"><img src="img/fb.png" alt="rss">
</a><a href="#"><img src="img/in.png" alt="rss">
</a><a href="#"><img src="img/yt.png" alt="rss">
</a><a href="#"><img src="img/tw.png" alt="rss">
</a>
</div>
<h2 class="nl">Newsletter</h2>
<p class="p1">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium</p>
<input class="txt" type="text" placeholder="your email address"><br>
<button class="btn">Subscribe</button>
</div>
<div class="co">
<h2>Contact</h2>
<form action="#">
<input class="txt" type="text" placeholder="your name"><br>
<input class="txt" type="text" placeholder="your email address">
<textarea class="tarea" cols="30" rows="10" placeholder="message"></textarea>
<button class="btn">Send it</button>
</form>
</div>
<div class="nu">
<h2>News Updates</h2>
<p>
<img src="img/banner/1.gif" alt="img">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
<p>
<img src="img/banner/2.gif" alt="img">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.
</p>
<p class="no-img">
<img src="img/banner/3.gif" alt="img">
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium.
</p>
<button class="btn">Visit our Blog</button>
</div>
</div>
<!-- contact结束 -->
<!-- footer开始 -->
<div class="footer">
<div class="w">
<p class="copy">Copyright 2010. Studio VIVROCKS. All Rights Reserved.</p>
<p>Site Powered by Wordpress. Design and Developed by VIVROCKS.</p>
<p class="move"><a href="#">Home</a> | <a href="#">About</a> | <a href="#">Products</a> | <a href="#">Services</a> | <a href="#">Contact</a></p>
<p class="move"><a href="#">Privacy Policy</a> | <a href="#">Terms of use</a></p>
</div>
</div>
<!-- footer结束 -->
<!--[if IE 6]>
<script src="js/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">DD_belatedPNG.fix('div,img,a,h1');</script>
<![endif]-->
</body>
</html>
css代码如下:
body{
background-image: url(../img/bj.png);
background-repeat: repeat-x;
}
.clearfix:before,
.clearfix:after{
content: "";
display: table;
clear: both;
}
.clearfix{
zoom:1;
}
.w{
width: 940px;
margin: 0px auto;
}
.header{
padding: 37px 0px 46px;
}
.logo{
margin-left: 15px;
}
/*导航*/
.nav {
float: right;
margin: 22px 0px 0px;
}
.nav li:hover{
opacity: 0.5;
}
.nav li{
float: left;
padding: 0px 10px 9px;
border-left: 1px #d6d6d6 dotted;
}
.nav a{
clear: #666;
font: 14px Georgia;
font-weight: bold;
text-decoration: none;
}
.nav a:{
color: #a5a4a4;
text-decoration: underline;
}
.nav p{
color: #b7b7b7;
font: 12px Tahoma;
}
.banner{
height: 356px;
background: url(../img/banner-bg.png) no-repeat bottom center;
position: relative;
}
.pointerDiv{
position: absolute;
top:314px;
left:15px;
}
.pointerDiv a{
float: left;
width: 17px;
height: 17px;
background:url(../img/pointer.png) no-repeat;
}
.pointerDiv .active,
.pointerDiv a:hover{
background: url(../img/pointer2.png) no-repeat;
}
/*********************content*********************/
.content h1{
text-align: center;
font:bold 24px Georgia;
padding:6px 0px 20px 0px;
margin-bottom: 30px;
background: url(../img/line.png) no-repeat bottom center;
}
.content .pl,.content .cs,
.contect .sc,.contect .co{
float: left;
}
.content .pl,.contect .sc{
width: 302px;
}
.content .cs,.contect .co{
width: 320px;
margin-left: 18px;
}
.content .uc,.contect .nu{
float: right;
width: 300px;
}
.content h2{
clear: #11719e;
font:21px Georgia;
}
.content .p1{
color: #8c8c8c;
font: 12px Helvetica;
}
.content .imgDiv{
width: 299px;
height: 202px;
background:url(../img/img-bg.png) no-repeat;
margin: 15px 0px;
padding-top:12px ;
text-align: center;
}
.content .p2{
height: 92px;
color: #3e3e3e;
font: 13px Helvetica;
}
.content .lm{
display: block;
width: 163px;
height: 40px;
background: url(../img/btn1.png) no-repeat;
color: #016999;
font: 12px/40px Helvetica;
text-indent: 1em;
text-decoration: none;
margin-bottom: 35px;
}
.contect{
background:url(../img/line.png) no-repeat top center;
}
.contect .txt{
width: 276px;
height: 33px;
line-height: 33px;
background: url(../img/input.png) no-repeat;
_background-attachment: fixed;
border:none;
padding: 0 10px;
margin: 0px 0px 16px;
}
@media screen and (-webkit-min-device-pixel-ratio:0){
.contect .terea{
display: block;
}
}
.contect .tarea{
display: block;
width: 276px;
height: 114px;
background: url(../img/textarea.png) no-repeat;
_background-attachment: fixed;
border:none;
overflow: auto;
resize:none;
padding: 10px;
margin: 0;
}
.contect .btn{
width: 163px;
height: 32px;
background: url(../img/btn2.png) no-repeat;
border:none;
padding: 0px;
margin: 11px 0px 23px;
color:white;
font:13px Georgia;
text-align: left;
text-indent: 1em;
cursor: pointer;
}
.co h2,.sc h2,.nu h2{
width: 296px;
color: #444;
font:18px Georgia;
border-bottom: 1px dashed #d3d3d3;
margin: 44px 0px 15px 0px;
padding-bottom: 9px;
}
.sc .p1{
color: #444;
font: 12px Helvetica;
}
.icon{
font-size: 0;
margin-top: 2px;
}
.sc .nl{
color: #444;
font:bold 18px "Gill Sans MT";
margin-top:17px;
}
.sc .txt{
margin-top:14px;
_margin-top:14px;
margin-bottom: 0px;
}
.nu img{
float: left;
margin-right: 8px;
}
.nu p{
height:58px;
_height:60px;
color: #444;
font:12px Helvetica;
border-bottom: 1px dashed #d3d3d3;
margin-bottom: 15px;
padding-bottom: 8px;
}
.nu .no-img{
margin-bottom: 1px;
}
.footer{
height: 173px;
background: #333;
border-top:10px solid #4c4c4c;
}
.footer a,.footer p{
color: #999;
font:11px Helvetica;
text-decoration: none;
}
.move a:hover{
color: #d1d2d2;
text-decoration: underline;
}
.footer .copy{
float: right;
}
.footer p{
margin-left: 8px;
margin-right: 24px;
margin-bottom: 10px;
}
.footer .w{
padding: 18px;
}
效果如下: