运行代码 缩小
汉王
HTML代码
复制 格式化 注释 注释 清空
放大
AخA
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
<title>感应鼠标变化的实用按钮</title>
5
<meta http-equiv="content-type" content="text/html;charset=gb2312">
6
<style type="text/css">
7
.btn{display:block;height:38px;padding-left:40px;background-image:url(//ku.shouce.ren/files/images/201601/56a36df9a09b9.gif);background-repeat:no-repeat;background-position:0px 0px;float:left;color:#000000;}
8
.btn_word{float:left;display:block;height:38px;padding:0 20px 0 10px;background-image:url(//ku.shouce.ren/files/images/201601/56a36dfa4bdfe.gif);background-repeat:repeat-x;background-position:0px 0px;line-height:33px;}
9
.btn_right{float:left;display:block;width:8px;height:38px;background-image:url(//ku.shouce.ren/files/images/201601/56a36dfacdfb9.gif);background-repeat: no-repeat;background-position:0px 0px;}
10
.btn:hover{background-position:0 -38px;}
11
.btn:hover .btn_word{background-position:0 -38px;}
12
.btn:hover .btn_right{background-position:0 -38px;}
13
</style>
14
</head>
15
<body>
16
<a href="#" class="btn">
17
  <span class="btn_word">手册网</span>
18
  <span class="btn_right"></span>
19
</a>
20
</body>
21
</html>
CSS代码
复制 格式化 注释 注释 颜色 清空
放大
CSS代码...
x
 
1
JS代码
复制 格式化 注释 注释 清空
放大
JS代码...
xxxxxxxxxx
1
 
1
名称
CSS实现自动感应鼠标的漂亮按钮
分类
网站常用
描述
操作体验极棒的纯CSS按钮效果,自动感应鼠标是否移到了按钮上,移上后按钮就发生了变化,制作时候用了三张按钮图片用以修饰美化,图片自己顺着地址扣下来吧。本按钮的文字可以自定义,因此修改起来非常方便。
收藏