这导致了一个下划线链接:
<li><router-link to="/hello">Hello</router-link></li>我的理解是,router-link元素生成一个a标记。
我已经在CSS中尝试过这些东西:
router-link{
text-decoration: none;
}router-link a{
text-decoration: none;
}router-link a{
text-decoration: none !important;
}不幸的是,..but没有这些工作。
发布于 2017-06-28 16:54:17
Vue组件标记不会生成HTML标记。
在DOM检查器中查看哪些HTML标记的实际存在。
你需要使用普通的类名。
发布于 2020-04-22 03:06:51
如果使用Vuetify的人遇到这个问题,请注意下面的样式不工作,因为Vuetify的建筑风格。您必须使用内联CSS样式:
<router-link
style="text-decoration: none; color: inherit;"
to="/hello">发布于 2019-06-04 11:35:23
它被转换成<a ...
因此,要删除下划线,请尝试如下
a { text-decoration: none; }https://stackoverflow.com/questions/44808474
复制相似问题