如下:设置了#menu ul li a { display:block;} 按讲鼠标移到区域的时候,背景色就变化的,为啥现在必须把鼠标移到文字上,li的背景色才变呢?
#menu a:link {color:#666; text-decoration:none;}
#menu a:visited {color:#666;text-decoration:none;}
#menu a:hover {color:#ffffff;text-decoration:none;font-weight:bold;}
#menu a:active {color:#ffffff;text-decoration:none;font-weight:bold;}
#menu ul li { background: #eef; border-bottom: 1px solid #CCC; float:left;}
#menu ul li a { display:block; height: 38px; width:168px; line-height: 38px; float:left;}
#menu ul li a:hover { background:#3ab3ec; font-size:14px; font-weight:bold;}
#menu ul li a:active { background:#3ab3ec; font-size:14px; font-weight:bold;}
回复讨论(解决方案)
找到原因了。因为有两个套在一起的DIV都被设置绝对位置了。导致全网页的很多元素都不正常。
呵呵,楼主真可爱
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn