当 text-decoration属性的值设置为 underline
之后,可以用 text-underline-position
属性为其设置下划线的位置。
text-decoration: underline;
text-underline-position: under;
under——强制下划线的位置为字母基线的下方,在这个位置,下划线不会穿过任何字母,视觉效果更佳。
前后效果如下:
当 text-decoration属性的值设置为 underline
之后,可以用 text-underline-position
属性为其设置下划线的位置。
text-decoration: underline;
text-underline-position: under;
under——强制下划线的位置为字母基线的下方,在这个位置,下划线不会穿过任何字母,视觉效果更佳。
前后效果如下: