利⽤HTML+CSS进⾏页⾯练习(3)利⽤HTML+CSS进⾏页⾯练习(3)
HTML代码如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>页⾯练习</title>
<!--将外部CSS⽂件引⼊-->
<link rel="stylesheet" href="css/reset.css"/>
txt文件改vbs后没反应<link rel="stylesheet"type="text/css" href="css/page-index.css"/>
</head>
<body>
<!--头部⽂件开始-->
<div class="header w">
<!--创建⼀个导航条-->
<div class="nav">
<ul>
<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>
stopdoing翻译
<a href="#">BLOG</a>
<p>Fellow our updates</p>
</li>
<li>
学生个人网页制作html代码css<a href="#">CONTACT</a>
<p>Ways to reach us</p>
</li>
</ul>
</div>
<!--设置logo-->
<div class="logo">
<a href="#" title="这是⼀个好的⽹站">
<img src="img/logo.png" alt="⽹站的logo"/>
</a>
</div>
</div>
<!--头部⽂件结束-->
<!--banner⽂件开始-->
<div class="banner w">
<img src="img/banner/banner01.png" alt="这是⼀张图⽚"/>
<div class="poinerDIV">
<a href="#"></a>
<a class="active"></a>
<a 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>有专门写sql的兼职吗
<div class="pl">
<h2>Perfect Logic</h2>
<p class="p1">All you want your website to do.</p>
<div class="imgDiv">
<img src="img/img1.jpg"/>
</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 class="lm" href="#">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/img2.jpg"/>
</div>
<p class="p2">Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione volupta tem sequi nesciun tdolore magnam aliquam quaerat voluptatem.</p>
<a class="lm" href="#">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/img3.jpg"/>
</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 i ncidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p>
<a class="lm" href="#">Learn More</a>
</div>
</div>
<!--content结束-->
<!--contant开始-->
<div class="contant 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"/></a>
<a href="#"><img src="img/fb.png"/></a>
<a href="#"><img src="img/in.png"/></a>
<a href="#"><img src="img/yt.png"/></a>
<a href="#"><img src="img/tw.png"/></a>
</div>
<h2 class="nl">Newsletter</h2>
<p class="p1">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium</p>
<form action="#">
<input class="txt"type="text" placeholder="your email address"/>
<button class="btn">Subscribe</button>
<button class="btn">Subscribe</button>
</form>
</div>
<!--中间-->
<div class="co">
<h2>Contact</h2>
<form action="#">
<input class="txt"type="text" placeholder="your name"/>
<input class="txt"type="text" placeholder="your email address"/>
<textarea class="tarea"></textarea>
<button class="btn">Send it</button>
</form>
</div>
<!--右边-->
<div class="nu">
<h2>News Updates</h2>
<p>
<img src="img/pic/1.gif"/>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
<p>
<img src="img/pic/2.gif"/>
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.
</p>
<p class="no-margin">
<img src="img/pic/3.gif"/>
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium.
</p>
<button class="btn">Visit our blog</button>
vector
</div>
</div>
<!--contant结束-->
<!--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>
<a href="#">Home</a>|
<a href="#">About</a>|
<a href="#"> Products</a>|
<a href="#">Services</a>|
<a href="#">Contact</a>
</p>
<p>
<a href="#">Privacy Policy</a>|
<a href="#">Terms of use</a>
</p>
</div>
</div>
<!--footer结束-->
</body>
</html>
CSS代码如下:
/*设置body背景颜⾊*/
/*设置body背景颜⾊*/
body{
background:url(../img/bd-bg.png) repeat-x;
}
/*固定宽度*/
.w{
width: 940px;
margin: 0 auto;
}
/*设置头部div*/
.header{
/*background-color: #bfa;*/
padding-top: 37px;
padding-bottom: 46px;
}
/*设置logo的样式*/
.logo{
/*设置logo的⼀个左外边距*/
margin-left: 15px;
}
/*设置导航条的样式*/
.nav{
float: right;
margin-top: 22px;
}
.
nav li{
/*设置向右浮动*/
float: left;
/*设置左右内边距为10px*/
padding: 0 10px 9px;
/*设置边框*/
border-left: 1px #d6d6d6 dotted;
}
.nav a{
font: bold 14px Georgia;
/*去除下划线*/
text-decoration: none;
color: #666666;
}
/*为超链接设置⿏标移⼊样式*/
a:hover{
color: #9b9898;
text-decoration: underline;
}
.nav p{
font: 11px Tahoma;
color: #b7b7b7;
}
.banner{
height: 356px;
position: relative;
background:url(../img/banner-bg.png) no-repeat center bottom; }
.poinerDIV{
position: absolute;
top: 314px;
left: 15px;
left: 15px;
}
.
poinerDIV a{
float: left;
height: 17px;
width: 17px;
background:url(../img/pointer.png) no-repeat;
margin-left: 4px;
}
.poinerDIV .active,
.poinerDIV a:hover{
background:url(../img/pointer-active.png);
}
/
*设置content的样式*/
.content{
/*background-color: #bfa;*/
}
/*解决⾼度塌陷*/
.clearfix:before, .clearfix:after{
content:"";
display: table;
clear: both;
}
/*兼容IE6*/
.
clearfix{
zoom: 1;
}
.content h1{
text-align: center;
font: bold 24px Georgia;
padding: 6px 0 20px 0;
background:url(../img/line2.png) no-repeat center bottom; margin-bottom: 38px;
}
.content .pl, .content .cs, .content .uc{
/*height: 200px;*/
width: 300px;
/*background-color: yellow;*/
float: left;
}
.content .cs, .contant .co{
margin: 0px 20px;
}
.content h2{
color: #11719e;
font: 21px Georgia;
}
.
content .p1{
color: #8c8c8c;
font: 12px Helvetica;
}
.content .imgDiv{
width: 299px;
height: 190px;
background:url(../img/img-bg1.png) no-repeat;
text-align: center;
margin: 16px 0px 10px 0px;
padding-top: 12px;
}

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。