且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

svg< text> < a>中的元素元素在Chrome中的悬停时下划线

更新时间:2022-12-03 10:07:34

当您在jsfiddle中复制代码时,不会发生这种情况>,所以我猜您的样式表中有这样的内容:

This doesn't happen when you reproduce your code in a jsfiddle, so I'm guessing your stylesheet has something like this:

a:hover {
   text-decoration: underline;
}

尝试通过编写以下行为来替代此行为:

Try overriding this behavior by writing:

svg a:hover {
   text-decoration: none;
}