标签:
#top {
text-align: right;
margin-bottom: 150px;
margin-top: 20px;
}
#top a {
color: black;
font-size: 13px;
margin-right: 10px;
}
#top a.more-product {
color: white;
background-color: #38f;
display: inline-block;
width: 80px;
height: 25px;
text-decoration: none;
text-align: center;
line-height: 25px;
}
#main {
text-align: center;
margin-bottom: 50px;
}
#main img {
width: 500px;
height: 129px;
}
#main input {
width: 500px;
height: 35px;
font-size: 20px;
}
#main div a {
color: white;
background-color: #38f;
display: inline-block;
height: 35px;
line-height: 35px;
text-decoration: none;
}
#bottom {
text-align: center;
}
#bottom div a {
font-size: 14px;
margin-right: 10px;
margin-left: 10px;
HTML设置:
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <!--标题 --> <title>亚联一下,你就知道</title> <!--统一设置css样式 --> <link rel="stylesheet" href="css/index.css"> </head> <body> <!--头部 --> <div id="top"> <a href="#">糯米</a> <a href="#">新闻</a> <a href="#">hao123</a> <a href="#">地图</a> <a href="#">视频</a> <a href="#">贴吧</a> <a href="#">登陆</a> <a href="#">设置</a> <a href="#" class="more-product">更多产品</a> </div> <!--中部 --> <div id="main"> <img src="images/mag.png"> <!--因为换行所以另起一行 --> <div> <input placeholder="你要找什么呢?"> <a href="#">亚联一下</a> </div> </div> <!--尾部 --> <div id="bottom"> <div> <!--因为换行所以另起一行 --> <a href="#">把亚联设为主页</a> <a href="http://www.afcat.com.cn/">关于亚联</a> <a href="#">About Others</a> </div> <div> ©2015 Baidu <a href="#">使用百度前必读</a> <a href="#">意见反馈</a> 京ICP证030173号 <img src="images/icons.png"> </div> </div> </body> </html>
效果:
标签:
原文地址:http://www.cnblogs.com/aixiaoxin/p/5029348.html