Mar
6

鼠标移过时背景改变的效果     2009

 15:16    156    0   noel 程序 代码 源码 不指定 | |
当鼠标移过时一整行背景改变的效果


onMouseOver="this.style.backgroundColor='#F5FBFF'" onMouseOut="this.style.backgroundColor='#FFFFFF'"


用CSS实现的

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
*{
    margin:0px;
    padding:0px;
    }
.box li{
    list-style:none;
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    display:block;
    line-height:20px;
    width:100%
    }
.box li a{
    text-decoration:none;
    color:#666666;
    display:block;
    width:100%
    }
.box li a:hover{
    text-decoration:none;
    color:#000;
    background:#CCCCCC;
    display:block;
    width:100%
    }
</style>
</head>
<body>
<ul class="box">
<li><a href="#">1111111</a></li>
<li><a href="#">22222222</a></li>
<li><a href="#">333333333</a></li>
<li><a href="#">4444444444</a></li>
<li><a href="#">55555555555</a></li>
</ul>
</body>
</html>

作者:noel@ECMall Ecmall二次开发 - PHP技术-
地址:http://www.laohucheng.com/post/94/
版权所有©转载时必须以链接形式注明作者和原始出处及本声明!

引用(0)
发表评论
昵称 [注册]
密码 游客无需密码
网址
电邮
打开HTML 打开UBB 打开表情 隐藏 记住我