关于CSS中background:url()属性
页面代码:
<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=gb2312"/> <link href='../css/all.css' rel="styleSheet" type="type/css"> </head> <body> <div id='header'> <div id='menu'> <ul> <li><a href="index.html">首 页</a></li> <li><a href="research.html">研究方向</a></li> <li><a href="topic.html">研究课题</a></li> <li><a href="team.html">研究团队</a></li> <li><a href="cooperation.html">交流合作</a></li> <li><a href="product.html">研究成果</a></li> <li><a href="passenger.html">毕业成员</a></li> <li><a href="contact.html">联系我们</a></li> </ul> </div> <div class='cnt'> <div class='t2'> 实验室简介: </div> <div class='intro'> XXXX内容XXXX </div> </div> <script> </script> </body></html>
* { outline:medium none;}body { font-family:Verdana; font-size:12px; line-height:1.5;}a { color:#000; text-decoration:none;}a:hover{ color:#F00}#header{ background: url("../image/banner.png"); height:150px; overflow:visible; position:relative; z-index:995;}#header #menu{ left:0; margin:0; overflow:visible; padding:0; position:absolute; top:75px; width:100%; z-index:990; border:1px solid #CCC; height:26px; background:#eee;}#menu ul{ list-style:none; margin:0px; padding:0px;}#menu ul li{ float:left; padding:0px 8px; height:26px; line-height:26px;}