如何在Vue.js项目的导航栏中右键对齐链接?

时间:2017-07-27 02:44:28

标签: css css3 vue.js vue-material

我想在我的导航栏中右键对齐我的产品和支持链接。如何整合项目导航栏中的链接?

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>

1 个答案:

答案 0 :(得分:3)

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