用CSS实现的一张图完成的按钮效果

2022-04-15 0 625

<style> .inp_L1,.inp_L2,{background:url(https://www.jb51.net/images/bg_x.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} </style> <input type=”submit” value=”登 录” class=”inp_L1″ onMouseOver=”this.className=’inp_L2′” onMouseOut=”this.className=’inp_L1′” id=”input_btn1″ name=”enter.x” tabindex=”4″>

[Ctrl+A 全选 注:引入外部Js需再刷新一下页面才能执行]

<head> <meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ /> <title>用CSS实现的一张图完成的导航条</title> <style> 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(https://www.jb51.net/images/bg-2.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;} </style> </head> <body> <div id=”info”> <ul> <li id=”car”><a href=”#” target=”_blank”><span> 游 戏</span></a></li> <li id=”job”><a href=”#” target=”_blank”><span> 娱 乐</span></a></li> <li id=”eve”><a href=”#” target=”_blank”><span> 菜 单</span></a></li> <li id=”oth”><a href=”#” target=”_blank”><span> 好 玩</span></a></li> </ul> </div> </body> </html>

[Ctrl+A 全选 注:引入外部Js需再刷新一下页面才能执行]

免责声明:
1、本网站所有发布的源码、软件和资料均为收集各大资源网站整理而来;仅限用于学习和研究目的,您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。 不得使用于非法商业用途,不得违反国家法律。否则后果自负!

2、本站信息来自网络,版权争议与本站无关。一切关于该资源商业行为与www.niceym.com无关。
如果您喜欢该程序,请支持正版源码、软件,购买注册,得到更好的正版服务。
如有侵犯你版权的,请邮件与我们联系处理(邮箱:skknet@qq.com),本站将立即改正。

NICE源码网 CSS/HTML 用CSS实现的一张图完成的按钮效果 https://www.niceym.com/16652.html