一、底部导航的编写
被点击当前路由颜色改变
#app #nav .router-link-active{
color: red;
}
<template>
<div id="app">
<div id="nav">
<router-link class="taber" to="/music">
<i class="iconfont logo"></i>
音乐
</router-link>
<router-link class="taber" to="/mv">
<i class="iconfont logo"></i>
mv</router-link>
</div>
<router-view></router-view>
</div>
</template>
#app {
width:10rem;
margin-left:auto;
margin-right:auto;
position: relative;
background: linear-gradient(pink,white);
position: relative;
}
#nav{
position: fixed;
top:955px;
background: #fff;
width: 100%;
height: 100px;
z-index: 900;
}
.icon{
width: 30px;
height: 30px;
display: block;
}
.taber{
width: 400px;
display: inline-block;
text-align: center;
text-decoration: none;
color: gray;
font-size: 25px;
line-height: 40px;
}
.logo{
display: block;
font-size: 35px;
margin-top: 20px;
}