纯CSS实现鼠标移动切换图片示例

建站知识 2021-07-03 08:15www.168986.cn长沙网站建设

复制代码
代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://.w3./TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://.w3./1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>纯CSS图片特效</title>
<style>
.-uc-but{ height:auto; width:600px;}
.-uc-but div{height:90px; float:left; }
.-uc-but a{height:90px}
.-uc-a a{background:#c; width:95px; display:block;}
.-uc-a a:hover{background:url(/jscss/demoimg/wall_s1.jpg) no-repeat;}
.-uc-b a{background:#c;width:95px; display:block;}
.-uc-b a:hover{background:url(/jscss/demoimg/wall_s2.jpg) no-repeat;}
.-uc-c a{background:#c; width:95px; display:block;}
.-uc-c a:hover{background:url(/jscss/demoimg/wall_s3.jpg) no-repeat;}
.-uc-d a{background:#c; width:95px; display:block;}
.-uc-d a:hover{background:url(/jscss/demoimg/wall_s4.jpg) no-repeat;}
.-uc-but a:link,.-uc-but a:visited,.uc-regis-but a:link,.uc-regis-but a:visited{color:#fff; font-size:0px;}
.-uc-but a:hover{color:#d7d7d7;}
</style>
</head>
<body>
<div class="-uc-but">
<div class="-uc-a"><a href="#">修改密码</a></div>
<div class="-uc-b"><a href="#">修改个人资料</a></div>
<div class="-uc-c"><a href="#">查看邮件</a> </div>
<div class="-uc-d"><a href="#">优币查询提现</a> </div>
</div>
</body>
</html>

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by