SEO入门 SEO技术 搜索引擎知识 SEO作弊 SEO工具 SEO案例 网站重构 网站推广 Google 百度 新浪 Yahoo 搜狐 Tom Msn 网易 腾讯 Alexa Dmoz
您现在的位置: SEO技术联盟 >> SEO >> 网页设计 >> 网站重构 >> 正文

自定义网页超链接下划线的CSS代码

作者:佚名 文章来源:cz268.com 更新时间:2008-1-21 15:23:20           

链接元素的所有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%;
}

【字体: 】【打印此文】【关闭窗口