1. 程式人生 > 其它 >css當中hover用法

css當中hover用法

css當中hover用法

6.hover
例 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>

更多內容請見原文,文章轉載自:

https://blog.csdn.net/qq_43650923/article/details/102687961