a.router-link-active
时间: 2023-09-13 08:07:23 浏览: 148
a.router-link-active是用于定义vue-router中激活选中时的样式的类名。
在例子中,当router-link被点击时,它会添加router-link-active类,这样就可以通过定义router-link-active类来改变激活选中时的样式。
通过在样式表中重新定义router-link-active类,可以修改a标签点击时的样式,比如改变颜色、添加下划线等效果。这样可以使得当前选中的链接在视觉上与其他链接有所区别。<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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [router-link-active](https://blog.csdn.net/weixin_41615439/article/details/104345943)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [vue写footer导航,点击哪个让哪个变色并路由跳转(router-link-active的作用)以及vue路由的重定向。...](https://blog.csdn.net/qq_43923146/article/details/108345778)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文