![87dcecac-fc18-eb11-8da9-e4434bdf6706.png](http://p03.5ceimg.com/content/87dcecac-fc18-eb11-8da9-e4434bdf6706.png)
本文只是个简单的小栗子,适合前端小白去熟悉,HTML,CSS。
HTML部分
<!DOCTYPE html>
有两个CSS文件
1.CSS常规设置
body,div,ul,h3,li{margin: 0px;padding: 0px;}
body{text-align: center;font-size: 10;}
a{text-decoration: none;}
li{list-style: none;}
2.CSS主体部分
.first_one {
width: 1000px;
height: 30px;
background-color: ghostwhite;
margin: 0 auto;
/*border:1px solid green;*/
}
.first_one li{
float: left;
}
.first_one a,.first_two a,.first_two span{
line-height: 30px;
color: grey;
font-size: 12px;
margin-left: 10px;
}
.first{
width: 100%;
height: 30px;
background-color: ghostwhite;
}
.first_two{
float: right;
}
a:hover{color: red;
text-decoration: underline;}
/*第二部分*/
.two{
height: 60px;
margin-left: 320px;
margin-top: 30px;
}
.two img{
float: left;
}
.two_one{
float: right;
margin-top: 25px;
margin-right: 324px;
}
.two_text{
width: 265px;
height: 21px;
border: 3px solid red;
position: relative;
left: 5px;
top: -1px;
}
.two_bu{
width: 51px;
height: 29px;
background-color: red;
border: 0px;
color: white;
}
/*第三段*/
.three{
margin-left: 320px;
margin-right: 324px;
height: 30px;
}
.three_one h3{
font-size: 23px;
clear: both;
float: left;
color: red;
}
.three_two{
line-height: 30px;
float: right;
color: gainsboro;
margin-top: 10px;
}
/*第四部分*/
.four{
background-color: gainsboro;
width: 1000px;
height: 40px;
margin-left: 320px;
float: left;
}
.four li{
float: left;
font-size: 12px;
color: gray;
line-height: 40px;
}
.four li:nth-child(1){width: 90px;border-top: 3px solid red;}
.four li:nth-child(2){margin-left: 80px;}
.four li:nth-child(3){margin-left: 400px;}
.four li:nth-child(4){margin-left: 70px;}
.four li:nth-child(5){margin-left: 110px;}
.four li:nth-child(6){margin-left: 50px;}
/*第五部分*/
.five{
clear: both;
width: 1000px;
height: 150px;
margin-left: 320px;
margin-top: 80px;
border: 1px solid gray;
background-color: #FFF4E8;
}
.five_one li{
margin-top: 30px;
float: left;
font-size: 12px;
color: black;
}
.five li:nth-child(1){width: 30px;}
.five li:nth-child(2){margin-left: 20px;}
.five li:nth-child(3){margin-left: 30px;}
.five li:nth-child(4){margin-left: 50px;}
.five li:nth-child(5){margin-left: 80px;}
.five li:nth-child(6){margin-left: 30px;}
.five li:nth-child(7){margin-left: 50px;}
.five li:nth-child(8){margin-left: 30px;}
.five input{width: 30px;position: relative;left:5px;text-align: center;}
.five_bu{position: relative;left:10px;}
.five a{color: black;}
.six{clear: both;
width: 1000px;
height: 150px;
margin-left: 320px;
margin-top: 30px;
border: 1px solid gray;
background-color: #FFF4E8;
}
.six_one li{
margin-top: 30px;
float: left;
font-size: 12px;
color: black;
}
.six li:nth-child(1){width: 30px;}
.six li:nth-child(2){margin-left: 20px;}
.six li:nth-child(3){margin-left: 80px;}
.six li:nth-child(4){margin-left: 140px;}
.six li:nth-child(5){margin-left: 100px;}
.six li:nth-child(6){margin-left: 30px;}
.six li:nth-child(7){margin-left: 50px;}
.six li:nth-child(8){margin-left: 40px;}
.six input{width: 30px;position: relative;left:5px;text-align: center;}
.six_bu{position: relative;left:10px;}
.six a{color: black;}
/*第六半径*/
.seven{clear: both;
width: 1000px;
height: 60px;
margin-left: 320px;
margin-top: 30px;
border: 1px solid gray;
background-color: white;}
.seven li{
float: left;
margin-top: 20px;
float: left;
font-size: 12px;
color: gray;
}
.seven li:nth-child(1){width: 10px;}
.seven li:nth-child(2){margin-left: 20px;}
.seven li:nth-child(3){margin-left: 20px;}
.seven li:nth-child(4){margin-left: 20px;}
.seven li:nth-child(5){margin-left: 60px;}
.seven li:nth-child(6){margin-left: 320px;position: relative;top:-10px;font-size: 14px;}
.seven li:nth-child(7){margin-left: 20px;position: relative;top:-10px;font-size: 14px;}
.seven li:nth-child(9){margin-left: 50px;position: relative;top:20px;right:140px;font-size: 14px;}
.seven li:nth-child(8){position: relative;top:-10px;font-size: 14px;}
/*第八部分*/
/*.eirht{
}*/
.eirht input{
width: 114px;
height: 61px;
background-color: red;
position: relative;
top: -20px;
left: 2px;
clear: both;
border: 1px solid red;
float: right;
font-size: 16px;
color:white;
text-align: center;
}
效果图是这样的
![88dcecac-fc18-eb11-8da9-e4434bdf6706.png](http://p03.5ceimg.com/content/88dcecac-fc18-eb11-8da9-e4434bdf6706.png)
关于页面功能的增加请等下次更新。