el-menu是Element UI库中的一个组件,其激活时的默认颜色由Element UI的样式表定义。通常,激活的菜单项会有一个is-active类。 2. 查找el-menu激活颜色相关的CSS类或样式 激活的菜单项通常会有.el-menu-item.is-active这个类。你可以通过浏览器的开发者工具来检查这个类的样式,并确定需要修改的属性。 3. 修改...
<el-menu-item index="/fault_new/">故障诊断</el-menu-item> <el-menu-item index="/trend_new/">趋势分析</el-menu-item> <el-menu-item index="/spectrogram/">谱图分析</el-menu-item> </el-menu> data(){return{activeIndex:'/device_new/',title:'设备管理'} },mounted() {this.active...
active-text-color 是选中的文本颜色 这句话设置选中的背景颜色 .el-menu-item.is-active { background-color: #ccff00!important; } <template><divclass="common-layout"><!--全屏的关键:height:100vh--><el-containerstyle=" height: 100vh"><el-asidestyle="background-color: #191970;"width="200p...
我今天也遇到这问题了,不过应该不是你这样理解的,文字颜色(十六进制格式)(已被废弃,使用--text-color)--text-color应该是让你声明一个css变量,从里面抽离出来。不直接在上面写text-color=“不直接写十六进制” 而是text-color=“var(--text-color)” style里面就写例如el-menu(外面包裹的标签元素){--text-co...
主要是设置 .el-menu-item.is-active 选择器的样式属性 官方文档中提供background-color、text-color、active-text-color三种属性 仅提供了激活菜单文字颜色,并没有提供激活菜单的其他参数 <el-menudefault-active="0"class="el-menu-vertical-demo"@open="handleOpen"@close="handleClose":collapse="collapsed"back...
el-menu在使用时有一个问题选某选的第一个,其它的项第一个的文字颜色也跟着一起修改了,这是哪里设置错了? <el-menu class="el-menu-vertical-demo" @open="menuChange" @select="gotoUrl" @close="handleClose" background-color="#304156" text-color="#BFCBD9" active-text-color="#1890ff"> <div...
点击下拉栏中的el-menu-item,然后观察单独的el-menu-item的背景颜色。 What is Expected? 当点击一个el-menu-item后,背景变色,但会立即或不久消失; 当点击另外的el-menu-item时,之前所点击的el-menu-item样式应该回复原状。 What is actually happening?
鼠标移入:.el-menu-item:hover {color: #a0cfff;background-color: #eaeeff !important;} 选中:.el-...
<h5>默认颜色</h5> <el-menu default-active="$route.path" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose"> <el-submenu index="1"> <template slot="title"> <i class="el-icon-location"></i> <span>导航一</span> ...