在网页设计中,下划线是一种常用的文字效果。CSS中提供了多种下划线样式,可以实现不同的视觉效果。下面我们就来介绍一些常见的CSS下划线样式。/* 实线下划线 */ .text{ border-bott
在网页设计中,下划线是一种常用的文字效果。CSS中提供了多种下划线样式,可以实现不同的视觉效果。下面我们就来介绍一些常见的CSS下划线样式。
/* 实线下划线 */ .text{ border-bottom: 1px solid #000; } /* 虚线下划线 */ .text{ border-bottom: 1px dotted #000; } /* 双实线下划线 */ .text{ border-bottom: 3px double #000; } /* 波浪线下划线 */ .text{ border-bottom: 2px solid #000; text-decoration: underline wavy #000; } /* 字母间隔下划线 */ .text{ text-decoration: underline; letter-spacing: 0.2em; } /* 右侧箭头下划线 */ .text{ text-decoration: underline; text-decoration-skip-ink: none; text-underline-position: under; position: relative; } .text:after{ content: ""; position: absolute; left: 100%; border-width: 0.15em 0 0 0.15em; border-style: solid; border-color: #000 transparent transparent #000; }
以上是一些常用的CSS下划线样式,可以根据不同的设计需求选择合适的样式来实现各种下划线效果。
粉丝
0
关注
0
收藏
0