自定义网页超链接下划线的CSS代码-Web标准教程

来源:模板无忧 作者: 更新时间:2007-10-26 点击:

链接元素的所有CSS属性可以合并为:

以下为引用的内容:
a {
text-decoration: none;
background: url(underline.gif) repeat-x 100% 100%;
padding-bottom: 4px;
white-space: nowrap;
}

假如你想自定义下划线的效果只在鼠标滑过链接时出现,只需设置CSS背景属性为:hover伪类,取代直接设置于链接元素上的样式即可。

以下为引用的内容:

a {
text-decoration: none;
padding-bottom: 4px;
white-space: nowrap;
}

a:hover {
background: url(underline.gif) repeat-x 100% 100%;
}

相关Web标准教程:
最新评论:
loading.. 评论加载中....
发表评论:不能超过250字节,请自觉遵守互联网相关政策法规.
  • 昵称: 验证:

最新Web标准教程