资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
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=gbk" /> <title>CSS伪类实现的鼠标滑动链接</title> <style> @charset "utf-8"; /* CSS Document For www.glzy8.com*/ body { text-align:center; font-size:12px; color:#777777; font-family:Verdana, Arial, Verdana, sans-serif,"宋体"; background-color:#FFFFFF; margin:0; padding:0; } #Nav { margin:0; float:left; padding:5px 5px; text-align:center; width:280px; border:1px solid #777777; } #Nav ul { margin:0; padding:0; list-style-type:none; } #Nav li { float:left; margin:0; width:130px; height:33px; margin-left:5px; padding:0; } #Nav a { display:block; width:130px; height:33px; line-height:33px; } #Nav a.Dict:link,#Nav a.Dict:visited { text-decoration:none; background:url(http://files.glzy8.com/demoimg/200910/nav.gif) left top no-repeat; } #Nav a.Dict:hover,#Nav a.Dict:active { text-decoration:none; font-weight:bold; background:url(http://files.glzy8.com/demoimg/200910/nav.gif) left -33px no-repeat; } #Nav a.MediaPlay:link,#Nav a.MediaPlay:visited { text-decoration:none; background:url(http://files.glzy8.com/demoimg/200910/nav.gif) left -66px no-repeat; } #Nav a.MediaPlay:hover,#Nav a.MediaPlay:active { text-decoration:none; font-weight:bold; background:url(http://files.glzy8.com/demoimg/200910/nav.gif) left -99px no-repeat; } #Nav a.RealPlay:link,#Nav a.RealPlay:visited { text-decoration:none; background:url(http://files.glzy8.com/demoimg/200910/nav.gif) left -132px no-repeat; } #Nav a.RealPlay:hover,#Nav a.RealPlay:active { text-decoration:none; font-weight:bold; background:url(http://files.glzy8.com/demoimg/200910/nav.gif) left -165px no-repeat; } </style> </head> <body> <center> <div id="Nav"> <ul> <li><a class="Dict" href="#" _ewebeditor_ta_href="%23">词霸</a></li> <li><a class="MediaPlay" href="#" _ewebeditor_ta_href="%23">MediaPlay</a></li> <li><a class="RealPlay" href="#" _ewebeditor_ta_href="%23">RealPlay</a></li> <li><a class="CodeFans" href="#" _ewebeditor_ta_href="%23">MediaPlay</a></li> <li><a class="RealPlay" href="#" _ewebeditor_ta_href="%23">RealPlay</a></li> </ul> </div> </center> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程