css当中hover用法

马克- to-win:马克 java社区:防盗版实名手机尾号: 73203。



例 1.6

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
    #mymenu{
        border: 1px solid black;
/* refer to favo.dbk2008.com
style.borderBottomWidth (Property)
it corresponding CSS syntax: border-bottom-width: aWidth
*/
        border-bottom-width: 4;
        width: 150px;
        background-color: #FF0000;
    }
    #mymenu a{


/*Elements having the display property set to "block" will be forced to start on a new line. qixy: this attribute can not be omitted.*/
        display: block;




/* the next statement is crucial, otherwise, there is no line inside the div. */
        border-bottom: 1px solid black;
    }
    #mymenu a:hover{
        font:bold 14pt Verdana;
        background-color: #ddddff;
    }
</style>
</head>
<body>
<div id="mymenu">
    <a href="http://www.zhangsan.com/ ">张三</a>
    <a href="http://www.qixy.com">马克-to-win</a>
    <a href="http://www.lisi.com/">李四</a>
</div>
</body>
</html>