我使用<abbr>
标签和CSS属性text-overflow: ellipsis
来展示一些被截断的单词的完整内容。
使用<abbr>
标签后,这些单词会有一个点状下划线,并在悬停时光标变成带有问号的样式。
我尝试过使用以下方法来更改它,但是我不确定这是否是最佳方式,这种方法有什么问题吗?
abbr[title] {
border-bottom: none !important;
cursor: default !important;
}
abbr
标签在a
标签或其他情况下,光标不应该是默认值,那么cursor: inherit
将是更好的选择。我将继续编辑您的答案。 - Chris Petersborder-bottom
和 text-decoration
两个属性都要设置。 - yalestar使用 abbr[title] {text-decoration: none !important;}
来移除它。
abbr[title] {cursor: default !important;}
text-decoration: none;
吗? - laaposto<abbr>
标签,它是用来表示缩写词的,而不是缩短的文本。这就好比您想要改变<h1>
标签,因为您把它用在了脚注上一样。 - Adriano Repetti