演示-链接 演示-单页 演示-书签 演示-语法 演示-杂烩 演示-美图 栏目演示 演示-影音 源码下载 立即购买 申请试用 使用手册 系统更新
流民:
[微博内容]CSS语法中,使用text-decoration定义来控制文字的下划线等属性。
语法:
text-decoration:none||underline||blink||overline||line-through
参数:
none:无划线
underline:下划线
blink:闪烁(部分机器不支持)
overline:上划线
line-through:贯穿线
2012-10-15 09:23:56
过客:
[微博内容]第二种是通过下边框假冒下划线
Quoted from Unkown:
这个方法实在是太妙了。但是也有一点点缺陷:但文字为英文或数字时,这个假冒的下划线明显离文字太远了(可能很多非中文的可能会出现这个问题)
2012-10-15 09:01:16
过客:
[微博内容]第三种就是用背景图片。
这个可以做到很多变化,因为我们可以用上各种线条图片。
缺点就是当链接多了,在读取图片的时候可能会比较消耗资源,慢一些。
不同的下划线2012-10-15 08:49:17
过客:
[微博内容]还记得有些超链接文本没有下划线,但是当鼠标移到它的上面的时候,下划线就浮现出来的情况么?自定义的下划线也可以做到这个效果,那就在:hover上设定超链接背景,而不是在超链接标记a上设定,如下:
a {
text-decoration: none;
padding-bottom: 4px;
white-space: nowrap;
}
a:hover {
background: url(underline.gif) repeat-x 100% 100%;
}
2012-10-15 08:44:52
过客:
[微博内容]静态下划线
a#example4a {
text-decoration: none;
background: url(’/pic/20069/200696144112132.gif’) repeat-x 100% 100%;
white-space: nowrap;
padding-bottom: 10px
}
2012-10-15 08:41:01
过客:
[微博内容]浮动花朵效果下划线
a#example4b {
text-decoration: none;
white-space: nowrap;
padding-bottom: 10px;
}
a#example4b:hover {
background: url(’/pic/20069/200696144112132.gif’) repeat-x 100% 100%;
}
2012-10-15 08:39:39
过客:
[微博内容]静态箭头下划线
a#example1a {
text-decoration: none;
background: url(’/pic/20069/200696144112997.gif’) repeat-x 100% 100%;
white-space: nowrap;
padding-bottom: 5px
}
2012-10-15 08:38:22
过客:
[微博内容]浮动动画箭头下划线 (这里箭头会出现滚动,不过这一滚动图片的效果只在部分浏览器中看得到)
a#example2b {
text-decoration: none;
white-space: nowrap;
padding-bottom: 5px;
}
a#example2b:hover {
background: url(’/pic/20069/200696144113188.gif’) repeat-x 100% 100%;}
2012-10-15 08:35:33[1/1]1
版权所有©飞速如风
精工细作 拒绝平庸