router-link放图片
时间: 2023-10-20 13:02:33 浏览: 143
对于给router-link放置图片,可以通过在router-link标签内部添加一个img标签来实现。例如:
<router-link to="/home">
<img src="image.jpg" alt="图片">
</router-link>
在这个例子中,我们将图片放在了router-link标签内部,当用户点击图片时会跳转到"/home"这个路由。你可以根据需要自定义图片的路径和样式。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [技巧2 router-link鼠标切换样式 vue3中.router-link-exact-active失效](https://blog.csdn.net/yangyangdt/article/details/122324830)[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%"]
- *3* [49. VUE router-link 标签的属性讲解 和 不通过router-link 实现路由跳转](https://blog.csdn.net/m0_46268961/article/details/125376016)[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 ]
阅读全文