如何右对齐 Vue.js 项目导航栏中的链接?
How do I right align links in the navigation bar of my Vue.js project?
我想在导航栏中右对齐我的产品和支持链接。如何对齐 vue.js 项目整体导航栏中的链接?
这是代码。
<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
link 的样式中。
<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。
我想在导航栏中右对齐我的产品和支持链接。如何对齐 vue.js 项目整体导航栏中的链接?
这是代码。
<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
link 的样式中。
<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。