HTML5源码-实现⼀个简单的个⼈主页
class="selected" 表⽰这个链接标签和其他链接标签有所不同
源代码:
<!doctype html>
<html>
<head>
<title>个⼈主页</title>
<link href="style.css" rel="stylesheet"  type="text/css" />
<meta charset="utf-8">
</head>
<body>
<header>
<h1>
个⼈  <span class="orange"> 的BLOG </span>
</h1>
</header>
<nav>
<ul>
<li><a href="index.html" class="selected">博客⾸页 </a> </li>
<li><a href="index1.html">关于我 </a></li>
<li><a href="index2.html">给我留⾔ </a></li>
<li><a href="index3.html">友情链接 </a></li>
<li><a href="index4.html">我的信箱 </a></li>
<li><a href="index5.html">社区 </a></li>
</ul>
</nav>
<div id="content">
<section>
<h1>晚上</h1>
<p> 早上起来脑袋都昏沉,直到现在都是。 机器还在响着,车间⾥更热,所以我不去开空调,只希望⾃然风再⼤些。 那些可爱的⼈们在我的眼⽪底下⾟苦的⼲着活,⼜脏⼜累,我怎么忍⼼ 把褥⼦被⼦都拿出去晒了,太阳出来⼜进去,到底是怎么啦提不起劲⼉? 这些⼯作都做完,喝了⼀杯温开⽔,汗流浃背,⾐服湿透了,脑袋依然昏沉。 宿舍⾥很压抑,不知道是⾃⼰的原因还是环境就这样?
</p>
<p>当年张爸爸在⼯地上,没有风扇,没有空调,只要⼀把旧芭蕉扇就度过了⼏个夏天,何况我晚上还有⼀台电风扇,⽐起他的艰⾟我这⼜算什么。 张妈妈在家⾥放了关于佛的书籍还有⾳乐,每天重复着⼤慈⼤悲,这些⾳乐听得我特别感动,⼀有空闲就想听听这样的⾳乐看看这些书。 他们本来就是⼀超善良的⼈们,过于懂得感恩是值得善待的⼈们,想到他们我就特⼼疼特忘情。
</p>
<p>昨天感冒了,这种天⽓下还能感冒,晚上吃了药今天就好了,好神奇啊,⾝体不舒服⼀剂药就可以治愈,如果⼼不舒服了该怎么?也许只是⼀句问候,⼀声关怀。可是,就是因为冷漠,才让⼈更⾃⽴的吧!
</p>
</section>
<aside>
<ul>
<li><a href="index1.html" class="selected">⽇志 </a> </li>            <li><a href="index1.html">相册 </a></li>
<li><a href="index1.html">个⼈档案 </a></li>
<li><a href="index1.html">分享 </a></li>
<li><a href="index1.html">⾳乐地带 </a></li>
<li><a href="index1.html">视频 </a></li>
<li><a href="index1.html">更多 </a></li>
</ul>
</aside>
</div>
<footer>
<p>版权朱林斯所有</p>
<hr />
<small>法律条⽂</small>
<small></small>
<small>客户意见</small>
<small>商户合作</small>
</footer>
</body>
</html>
CSS样式
@charset "utf-8";
*{margin:0px;padding:0px}
/* h5*/
body{
background-color:#eceddd;
font-family:Arial, Verdana,'Lucida Grande', Helvetica, sans-serif;    text-align: center;
color: #333333;
}
header{
background: url(Img/bgheader.jpg) no-repeat #85D0ED;
width: 902px;
height: 203px;
padding-top: 0px;
margin: 0px auto;
color: #000000;
}
header h1 {
float:left;
font-size:2.9em;
padding-top:60px;
padding-left:37px;
font-family:Arial,verdana, sans-serif;    color:#37210c;
font-weight:bolder;
letter-spacing:-1px;
}
.
orange{
color:#e67e1f;
}
nav{
list-style-type:none;
margin:0px auto;
width:902px;
background-color:#303;
clear:both;
}
nav ul{
list-style:none;
margin-bottom:0px;
margin-top:0px;
margin-left:0px;
width:902px;
}
nav ul li{
text-align:center;
float:left;
padding-left:0px;
padding-top:0px;
padding-bottom:0px;
width:150px;
}
nav ul li a{
display:block;
background-color:#37210c;
border-right:1px solid #fff;
line-height:2.5em;
margin-right:0px;
padding:8px 14px 8px 14px;
color: #ecf9ff;
font-weight:normal;
font-size: 0.8em;
text-decoration: none;
}
nav li a:hover{
color: #000;
background-color:#ecf9ff;
}
nav ul li .selected{
color: #ecf9ff;
background-color:#e67e1f;
}
aside{
float:left;
list-style:none;
margin-left:10px;
height:50%;
}
aside ul{
list-style:none;
margin-bottom:20px;
margin-top:20px;
margin-left:0px;
}
aside li{
text-align:left;
padding-left:0px;
padding-top:0px;
padding-bottom:0px;
border-bottom:1px solid #eaeada;
}
aside ul li a{
background-image: url(Img/bullet.gif);    background-repeat:no-repeat;
background-position:left center;
display:block;
background-color:#ffffff;
line-height:1.7em;
margin-right:0px;
padding-top:6px;
padding-bottom:6px;
padding-left:22px;
color: #666666;
font-weight:normal;
font-size: 0.8em;
text-decoration: none;
width:165px;
}
aside  li a:hover{
color: #37210c;
background-color:#f7f7f2;    }
aside .selected{
color: #37210c;
background-color:#f7f7f2;    }
#content{
margin:0 auto;
width:902px;
background-color:#dfeef9;    height:290px;
clear:both;
}
section{
float:left;
width:75%;
margin-right:0px;
margin-top:15px;
background-color:#FFF;
text-align:left;
font-size:0.9em;
padding:5px;
}
section h1{
display:block;
font-size:0.9em;
width:50px;
font weight bolder
font-family: arial;
text-align:left;
font-weight:bold;
color:#403f3b;
font-family:arial;
font-weight:bold;
padding:5px;
margin-top:5px;
margin-left:12px;
}
section p{

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