text-decoration在CSS中的使用方法

分类:知识百科 日期: 点击:0

CSS中的text-decoration属性是用来设置文本的装饰效果的,它可以用来添加下划线、删除线和上标等装饰效果。使用方法如下:

1. 为文本添加下划线:

text-decoration: underline;

2. 为文本添加删除线:

text-decoration: line-through;

3. 为文本添加上标:

text-decoration: overline;

4. 为文本添加下划线和删除线:

text-decoration: underline line-through;

5. 为文本添加下划线、删除线和上标:

text-decoration: underline line-through overline;

6. 为文本取消装饰效果:

text-decoration: none;

text-decoration属性还可以设置文本装饰效果的颜色,例如:

text-decoration-color: red;

text-decoration属性还可以设置文本装饰效果的样式,例如:

text-decoration-style: dashed;

text-decoration属性还可以设置文本装饰效果的位置,例如:

text-decoration-position: under;

text-decoration属性还可以设置文本装饰效果的间距,例如:

text-decoration-skip: ink;

text-decoration属性还可以设置文本装饰效果的模糊度,例如:

text-decoration-blur: 1px;
标签:

版权声明

1. 本站所有素材,仅限学习交流,仅展示部分内容,如需查看完整内容,请下载原文件。
2. 会员在本站下载的所有素材,只拥有使用权,著作权归原作者所有。
3. 所有素材,未经合法授权,请勿用于商业用途,会员不得以任何形式发布、传播、复制、转售该素材,否则一律封号处理。
4. 如果素材损害你的权益请联系客服QQ:77594475 处理。