用CSS实现的一张图完成的按钮效果
来源:
中文源码网 浏览:361 次 日期:2024-04-16 01:09:44
【下载文档: 用CSS实现的一张图完成的按钮效果.txt 】
用CSS实现的一张图完成的按钮效果
这个是网易126上的登陆按钮
.inp_L1,.inp_L2,{background:url(/upload/20080515201218970.jpg) no-repeat}
.inp_L1{ width:67px; height:23px; background-position:-4px -4px; border:0; color:#464646; line-height:23px}
.inp_L2{ width:67px; height:23px; background-position:-4px -30px; border:0; color:#464646; line-height:23px}
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]另外一个导航按钮
用CSS实现的一张图完成的导航条
ul,li{ list-style:none; float:left;}
body{ font-size:12px; line-height:1.6; font-family:Verdana, "宋体", Arial; text-align:center;}
#info li{ margin-left:4px; margin-top:15px;}
#info a {display:block;text-align:center; padding-left:15px;
padding-top:2px;padding-bottom:1px;background-image:
url(/upload/20080515201218783.GIF);
background-repeat: no-repeat;color: #000; width:47px; cursor:hand; text-decoration: none;}
#job a:link,#job a:visited{background-position: -62px 0px;}
#eve a:link,#eve a:visited{background-position: -124px 0px;}
#oth a:link,#oth a:visited{background-position: -186px 0px;}
#car a:hover ,#car a:active {background-position: 0px -22px; color:#fff;}
#job a:hover ,#car a:active {background-position: -62px -22px; color:#fff;}
#eve a:hover ,#car a:active {background-position: -124px -22px; color:#fff;}
#oth a:hover ,#car a:active {background-position: -186px -22px; color:#fff;}
游 戏
娱 乐
菜 单
好 玩
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]