elementUI 导航栏点击之后改变背景色,背景色悬停


一开始设置的是:

.menuLeft .el-menu-item:hover{
  background: #6db6ff !important;
}
.menuLeft .el-submenu__title:hover {
  background: #6db6ff !important;
}

但它只是hover事件,并不会使背景色悬停,一直存在。后来又设置了:

.menuLeft .el-menu-item.is-active {
  background: #6db6ff !important;
}
.menuLeft .el-submenu__title.is-active {
  background: #6db6ff !important;
}

 很好的解决了此问题。  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM