您当前的位置: 首页 >  css

彭世瑜

暂无认证

  • 3浏览

    0关注

    2791博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

css:text-decoration给文字增加上划线、删除线、下划线

彭世瑜 发布时间:2021-08-12 16:58:42 ,浏览量:3

CSS 语法

text-decoration: 

text-decoration-line

值描述none默认。定义标准的文本。underline定义文本下的一条线。overline定义文本上的一条线。line-through定义穿过文本下的一条线。blink定义闪烁的文本。inherit规定应该从父元素继承 text-decoration 属性的值。

text-decoration-style

值描述solid默认值。线条显示为单行。double线条显示为双线。dotted线条显示为点线。dashed线条显示为虚线。wavy线条显示为波浪线。initial将此属性设置为其默认值。inherit从其父元素继承此属性。

text-decoration-color

值描述color规定 text-decoration 的颜色。initial将此属性设置为其默认值。inherit从其父元素继承此属性。

示例


	.none {text-decoration: none}
	.underline {text-decoration: underline}
	.overline {text-decoration: overline}
	.line-through {text-decoration: line-through}
	.blink {text-decoration: blink}
	.inherit {text-decoration: inherit}


默认
下划线
上划线
删除线
闪烁文本
从父元素继承

在这里插入图片描述

联合写法示例


      
	.line-through-double-red {
	    text-decoration: line-through double red;
	}


从父元素继承

在这里插入图片描述

参考 CSS text-decoration 属性

关注
打赏
1665367115
查看更多评论
立即登录/注册

微信扫码登录

0.1281s