今日所学

Posted on 2017-03-30 20:00  echomk  阅读(125)  评论(0)    收藏  举报

今日主要学习力导航栏的制作:

1.html:

<!dcotype html>
<html>
<head>
<meta http-equiv="content-type" charset="utf-8" content="text/html"/>
<link rel="stylesheet" href="css/index.css"/>
</head>
<body>
<div class="header">
<div class="header_top">
</div>
<div class="header_middle">
<ul>
<li id="home"></li>
<li><a href="">网站首页</a></li>
<li><a href="">关于我们</a>
<ul>
<li><a href="">企业简介</a></li>
<li><a href="">成长历程</a></li>
<li><a href="">总裁致辞</a></li>
<li><a href="">联系我们</a></li>
</ul>
</li>
<li>新闻中心</li>
<li>产品展示</li>
<li>企业荣誉</li>
<li>项目案例</li>
<li>人才招聘</li>
<li>客户留言</li>
<li>联系我们</li>
</ul>
</div>
<div class="header_bottom"></div>
</div>
<div class="contrnt"></div>
<div class="footer"></div>
</body>
</html>

2.css

/*布局样式开始*/
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { margin:0; padding:0; }
body { background:#fff; color:#555; font-size:14px; font-family: Verdana, Arial, Helvetica, sans-serif; }
td,th,caption { font-size:14px; }
h1, h2, h3, h4, h5, h6 { font-weight:normal; font-size:100%; }
address, caption, cite, code, dfn, em, strong, th, var { font-style:normal; font-weight:normal;}
a { color:#555; text-decoration:none; }
a:hover { text-decoration:underline; }
img { border:none; }
ol,ul,li { list-style:none; }
input, textarea, select, button { font:14px Verdana,Helvetica,Arial,sans-serif; }
table { border-collapse:collapse; }
html {overflow-y: scroll;}
/* css common */
.clearfix:after {content: "."; display: block; height:0; clear:both; visibility: hidden;}
.clearfix { *zoom:1; }
/*头部样式开始*/
.header{ width:1007px;
height:440px;
background-color:#0FC;
margin:0 auto;}
.header_top{ width:1007px;
height:107px;
background-color:#FF0;}
.header_middle{ width:1007px;
height:55px;
background-color:#33F;}
#home{width:53px;
height:55px;
background: url(../images/home.jpg)}
.header_middle li{width:106px;
height:55px;
float:left;
background:url(../images/hedaer_middle_li.jpg);
text-align:center;
line-height:55px;
}
.header_middle>ul>li:hover{ background: url(../images/hedaer_middle_li2.jpg)}
#home:hover{ background: url(../images/hedaer_middle_li2.jpg)}
.header_middle>ul>li>ul{position:absolute; display:none;}
.header_middle>ul>li>ul>li{ float:none;}
.header_middle>ul>li:hover ul{ display:block;}
.header_bottom{ width:1007px;
height:278px;
background-color:#900;}
/*头部样式结束*/
/*内容样式开始*/
.contrnt{ width:1007px;
height:692px;
background-color:#6F9;
margin:0 auto;}
/*内容样式结束*/
/*底部样式开始*/
.footer{ width:1007px;
height:185px;
background-color:#F60;
margin:0 auto;}
/*底部样式结束*/
/*布局样式结束*/