当前位置: 首页 > news >正文

text-decoration 使用

text-decoration

text-decoration 用于设置文本上的装饰性线条的外观。

它是 text-decoration-linetext-decoration-styletext-decoration-colortext-decoration-thickness的缩写。

text-decoration: underline wavy red;

text-decoration-line 设置文本装饰类型

可以设置为none,或者多个下列的值。

  • none: 没有装饰效果,默认值
  • underline: 文本下方有一条装饰线
  • overline:文本上方有装饰线
  • line-through:有一条贯穿文本中间的修饰线
text-decoration-line: none;
text-decoration-line: underline;
text-decoration-line: overline;
text-decoration-line: line-through;
text-decoration-line: blink;
text-decoration-line: underline overline; /* Two decoration lines */
text-decoration-line: overline underline line-through; /* Multiple decoration lines */

text-decoration-style 设置线的样式

  • solid: 实线
  • double: 双实线
  • dotted:点线
  • dashed: 虚线
  • wavy:波浪线
text-decoration-style: solid;
text-decoration-style: double;
text-decoration-style: dotted;
text-decoration-style: dashed;
text-decoration-style: wavy;

text-decoration-color 设置修饰线的颜色

默认值为当前文本的颜色

/* Initial value */
text-emphasis-color: currentcolor;/* <color> */
text-emphasis-color: #555;
text-emphasis-color: blue;

text-decoration-thickness 文本装饰线厚度 (粗细)

  • auto: 由浏览器为文本装饰线选择合适的厚度
  • from-font: 如果字体文件中包含了首选的厚度值,则使用字体文件的厚度值。如果字体文件中没有包含首选的厚度值,则效果和设置为 auto 一样,由浏览器选择合适的厚度值
  • <length>: 将文本装饰线的厚度设置为一个值,覆盖掉字体文件建议的值或浏览器默认的值。
  • <percentage>: 将文本装饰线的粗细指定为当前字体中 1em 的 <百分比>。 百分比作为相对值继承,因此会随着字体的变化而缩放。 浏览器必须至少使用 1 个设备像素。 对于此属性的给定应用程序,即使存在具有不同字体大小的子元素,其所应用的整个框的厚度也是恒定的。
text-decoration-thickness: auto;
text-decoration-thickness: from-font;
/* length */
text-decoration-thickness: 0.1em;
text-decoration-thickness: 3px;/* percentage */
text-decoration-thickness: 10%;
http://www.lryc.cn/news/124079.html

相关文章:

  • linux shell快速入门
  • 【Spring源码】小白速通解析Spring源码,从0到1,持续更新!
  • Unity 鼠标实现对物体的移动、缩放、旋转
  • 67Class 的基本语法
  • 企业数字化转型:无形资产占比测算(2007-2021年)
  • [centos]设置主机名
  • 华为OD真题--新学习选址--带答案
  • Qt自定义对话框
  • Python 程序设计入门(018)—— format() 函数的用法详解
  • 演进式架构
  • OCP China Day 2023:五大社区齐聚,加速开源开放创新与落地
  • 【Linux】进程间通信之管道
  • 记录一个正则表达式
  • 用于全局复根和极点查找算法的自适应网格生成器(Matlab代码实现)
  • 修改Linux中SSH的端口
  • Ansible从入门到精通【六】
  • 国企的大数据岗位方向的分析
  • 【MySQL--->数据类型】
  • Ceph部署
  • 打工日记-Vue3+Ts二次封装el-table
  • funbox3靶场渗透笔记
  • springcloud3 hystrix实现服务降级,熔断,限流以及案例配置
  • ComponentOne Studio ASP.NET MVC Crack
  • OPENCV C++(十一)
  • ES使用心得
  • Stable Diffusion - 幻想 (Fantasy) 风格与糖果世界 (Candy Land) 人物提示词配置
  • 部署K8S集群
  • 在时间和频率域中准确地测量太阳黑子活动及使用信号处理工具箱(TM)生成广泛的波形,如正弦波、方波等研究(Matlab代码实现)
  • 一百五十四、Kettle——Linux上安装Kettle9.3(踩坑,亲测有效,附截图)
  • PackageNotFoundError: No package metadata was found for bitsandbytes解决方案