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

链接元素的所有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-bott

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

给TA打赏
共{{data.count}}人
人已打赏
CSS教程

CSS控制用户浏览网页的光标

2007-10-7 2:40:00

CSS教程

三种简洁的Tab导航(网页选项卡)

2007-10-8 1:03:00

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
有新私信 私信列表
搜索