日期:2014-05-16  浏览次数:20713 次

如何让<li>中的<a href="#">对该<li>操作
如题  在做下拉菜单时候 无法使主菜单的颜色改变
贴一下代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" > 

<head>
    <style type="text/css">
        *
        {
             width:50px;
             height:30px;
            }
       #main li ul
        {
                        text-align:center;
                        background-color: Gray;
                       
                        list-style: none;
                        padding: 0px;
                        
                        display:none;
                        margin-top:12px;
        }
        #main
        {
             text-align:center;
            }
        #main li
        {
              background-color:ButtonFace;
              list-style:none;
            }