vue router-link去掉下划线
时间: 2023-09-28 22:08:01 浏览: 183
要去掉Vue的router-link下划线,你可以通过自定义样式来实现。默认情况下,router-link会带有下划线并且是蓝色的。你可以使用以下样式代码来去除下划线:
a标签点击前的样式:
```
a {
text-decoration: none;
color: #000;
}
```
router-link点击后的样式:
```
.router-link-active {
text-decoration: none;
color: red;
}
```
通过添加这些样式,你可以去除下划线并自定义router-link的颜色。希望这对你有所帮助!<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [vue router-link 默认a标签去除下划线的实现](https://download.csdn.net/download/weixin_38560502/14712120)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Vue中消除router-link下划线](https://blog.csdn.net/qq_51114283/article/details/119560945)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文