我使用<abbr>
标记显示带有CSS属性text-overflow: ellipsis
的某些修饰词的全部内容。
当使用<abbr>
时,这些单词会带有虚线下划线,并且在悬停时光标变为带问号的单词。
我确实设法使用此更改它。但是,我不确定这是最好的方法,这种方法有什么问题吗?
abbr[title] {
border-bottom: none !important;
cursor: default !important;
}
最佳答案
从v40 Firefox switched开始,使用文本修饰提供下划线,并且 Chrome 将变为doing it that way too。因此,如果需要支持这些浏览器,则应更新代码以包括以下代码:
abbr[title] {
border-bottom: none !important;
cursor: inherit !important;
text-decoration: none !important;
}