【发布时间】:2021-05-30 08:35:21
【问题描述】:
我试图在一个单词上加粗下划线并与上面的单词重叠,有点像负填充下划线。就像“maygha”这个词在this image中的下划线一样
这就是我现在拥有的:
span {
border-bottom: 16px solid #a2c1f5;
}
<h1> hi there! <br> i'm <span> maygha!<span></h1>
【问题讨论】:
-
使用负数
margin-bottom以便 span 的“hitbox”更高。现在你的border-bottom可以触摸文本了。
标签: html css border padding underline