<!doctype html><html><head><meta charset="utf-8"><title>KZ0902广告网</title><link rel="stylesheet" type="text/css" href="css/index.css" /><link rel="icon" href="image/jj.jpg" type="image/x-icon"></head><body> <div id="top"> <div class="top orta"> <div class="top-top"> <div class="top-logo"><a href="#"><img src="image/dalogo.jpg"></a></div> <div class="top-daohang"> <ul> <li><a href="#">本站介绍</a></li> <li><a href="#">广告投放</a></li> <li><a href="#">休闲论坛</a></li> <li><a href="#">租售买卖</a> <ul class="erji_ul"> <li class="erji"><a href="#">房源信息</a></li> <li class="erji"><a href="#">求租信息</a></li> </ul> </li> <li><a href="youke.html">游客必访</a></li> <li><a href="index.html">网站首页</a></li> </ul> </div> </div> </div> </div></body></html>@charset "utf-8";/* 初始化CSS */html,body,ul,li,ol,dl,dd,dt,p,h1,h2,h3,h4,h5,h6,form,fieldset,legend,img{margin:0;padding:0;}fieldset,img{border:none;}img{display: block;}address,caption,cite,code,dfn,th,var{font-style:normal;font-weight:normal;}ul,ol{list-style:none;}body{padding:0 0;font:12px/20px "SimSun","微软雅黑","Microsoft YaHei",HELVETICA;/* overflow-y:scroll;*/ overflow-x:hidden;}a{color:#666;text-decoration:none; font-family: "KazNet"; font-size: 16px;}a:visited{color:#666;}a:hover,a:active,a:focus{color:#ff8400;text-decoration:underline;}.orta{ width: 1260px; margin-left: auto; margin-right: auto; }/*顶部logo导航区*/#top{ width: 100%; height: 76px; }.top-top{ width: 1260px; height: 76px; }.top-logo{ width: 420px; height: 76px; float: left;}.top-logo img{ padding-top: 15px;}.top-daohang{ width: 840px; height: 74px; float: right; font-family:}.top-daohang li{ display: block; float: right; width: 100px;}.top-daohang li a{ float: right; display: block; text-align: center; width: 100px; height: 74px; line-height: 74px; font-size: 16px; font-family :"STHeiti",黑体; }.top-daohang li a:hover{ border: solid 1px #e6e7e9; border-bottom: solid 4px #12aaf8; color:#12aaf8;}
1 回答
翰术
TA贡献21条经验 获得超8个赞
选择器的使用:
有一个 ‘>’子选择器,与之对应的是后代选择器 "空格"。
这两个的区别看他们的名字就明白了,子选择器选择子代,后代选择器选择所有后代。当然后代包括子代!
例如:
.top-daohang li { ...} //这么写就代表选择了.top-daohang下所有的li .top-daohang>ul>li {...}//这么写则代表选择紧挨着.top-daohan下的ul 的子代 li ‘’子代的子代不是我的子代‘’ 这样li包含的li就不会被选中也不会被设置样式了!
- 1 回答
- 0 关注
- 2349 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消