前端页面设计
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>博客首页</title>
<link rel="stylesheet" type="text/css" href="index.css">
</head>
<body>
<header>
<div id="logo"><a href="index.html">YuLuo</a></div>
<div id="menu">
<ul>
<li><a href="index.html">首页</a></li>
<li><a href="">博客</a></li>
<li><a href="">关于我</a></li>
<li><a href="">友情链接</a></li>
</ul>
</div>
</header>
<section>
<div>
</div>
<article class="blogarticle">
<h2>test2</h2>
<p>领先的 Web 技术教程 - 全部免费
在 w3school,你可以找到你所需要的所有的网站建设教程。
从基础的 HTML 到 CSS,乃至进阶的 XML、SQL、JS、PHP 和 ASP.NET。
从左侧的菜单选择你需要的教程!</p>
</article>
<article class="blogarticle"><h2>test2</h2>
<p>领先的 Web 技术教程 - 全部免费
在 w3school,你可以找到你所需要的所有的网站建设教程。
从基础的 HTML 到 CSS,乃至进阶的 XML、SQL、JS、PHP 和 ASP.NET。
从左侧的菜单选择你需要的教程!</p></article>
<article class="blogarticle">
<h2>test2</h2>
<p>领先的 Web 技术教程 - 全部免费
在 w3school,你可以找到你所需要的所有的网站建设教程。
从基础的 HTML 到 CSS,乃至进阶的 XML、SQL、JS、PHP 和 ASP.NET。
从左侧的菜单选择你需要的教程!</p>
</article>
</section>
<nav>
<table>
<tr>
<th><a href="http://www.abdiu.com">百度</a> </th>
<th><a href="http://www.abdiu.com">百度</a> </th>
<th><a href="http://www.abdiu.com">百度</a> </th>
</tr>
</table>
</nav>
<footer>
<h3>this page is designed by yuluo</h3>
</footer>
</body>
</html>
css设计
header{
height: 100px;
}
#logo{
float: left;
margin: 10px;
width: 10%;
height: 40px;
padding: 20px;
}
#logo a{
text-decoration: none;
font-size: 30px;
color: green;
text-align: center;
letter-spacing: 2px;
}
#menu{
float: left;
width: 60%;
height: 80px;
margin: 10px;
}
#menu ul{
height: 20px;
margin: 10px;
padding: 20px 20%;
}
#menu li{
padding: 10px;
font-size: 20px;
display: inline;
margin: 10px;
}
#menu li a{
color: black;
text-decoration: none;
}
section{
height:1000px;
}
section div{
position: inherit;
width: 100%;
height: 250px;
background: #0da344;
float: left;
margin-bottom: 10px;
}
.blogarticle{
background:floralwhite;
position: inherit;
width: 100%;
height: 250px;
margin: 10px 0px;
float: left;
}
.blogarticle h2,p{
text-align: center;
font-family: 微软雅黑;
}
nav{
height: 200px;
}
nav table{
position: inherit;
height:60%;
width: 90%;
text-align: center;
margin:65px;
}
nav a{
text-decoration: none;
font-family: 微软雅黑;
color: #0da344;
}
footer{
height: 100px;
}
footer h3{
text-align: center;
color: grey;
margin: 0px;
font-family: "等线 Light";
}
页面样式