gpt4 book ai didi

css - 如何右对齐 Vue.js 元素导航栏中的链接?

转载 作者:太空宇宙 更新时间:2023-11-03 22:38:15 24 4
gpt4 key购买 nike

我想在导航栏中右对齐我的产品和支持链接。如何对齐导航栏中的链接 元素整体?

This is how it looks now

这是代码。

<md-whiteframe class = "main-toolbar  ">

<md-theme name = "teal">

<md-toolbar class = "">

<router-link class = "nav-link " :to = " { name: 'levi' }" style = "color:white; text-decoration: none; ">levi</router-link>

<router-link id = "nav"class = "nav-link" :to = "{ name: 'Product' }" style = "color:white; text-decoration: none;">
Product
</router-link>

<router-link id = "nav" class = "nav-link" :to = "{ name: 'Support' }" style = "color:white; text-decoration: none;">
Support
</router-link>


</md-toolbar>

</md-theme>

</md-whiteframe>

最佳答案

flex:1 添加到您的 levi 链接的样式中。

<md-toolbar  class = "">
<router-link class = "nav-link " :to = " { name: 'levi' }" style = "color:white; text-decoration: none; flex: 1">levi</router-link>
<router-link id = "nav"class = "nav-link" :to = "{ name: 'Product' }" style = "color:white; text-decoration: none;">
Product
</router-link>
<router-link id = "nav" class = "nav-link" :to = "{ name: 'Support' }" style = "color:white; text-decoration: none;">
Support
</router-link>
</md-toolbar>

已更新 fiddle .

关于css - 如何右对齐 Vue.js 元素导航栏中的链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45340462/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com