在el-menu 组件中,鼠标悬停时的颜色通常是通过 .el-menu-item:hover 和.el-submenu__title:hover 这两个CSS类来控制的。你可以通过覆盖这两个类的样式来修改鼠标悬停时的颜色。 3. 提供修改该CSS类或样式的方法 要修改 el-menu 组件鼠标悬停时的颜色,你可以在你的Vue组件的 <style> 标签中添加相应...
/*主菜单样式*/>>>.el-submenu__title{}/*主菜单悬浮样式*//deep/.el-submenu__title:hover{color:white!important;background:#1890FF!important;}/*子菜单样式*//deep/.el-menu-item{background:#283847!important;}/*子菜单悬浮样式*//deep/.el-menu-item:hover{color:white!important;background:#18...
今天在在点击el-menu的一级菜单和二级菜单出现了点击成白色,刚好我设置的文字颜色也是白色,就变成什么都看不见了。 //设置一级菜单和二级菜单的背景颜色.el-sub-menu.el-menu-item{background-color:RGB(38,87,227)!important; } //设置选鼠标指针浮动在一级菜单的设置.el-menu-item:hover{background-color:...
鼠标移入: .el-menu-item:hover { color: #a0cfff; background-color: #eaeeff !important; } 选中: .el-menu-item.is-active { color: #6681fa; background-color: #eaeeff !important; }
点击下拉栏中的el-menu-item,然后观察单独的el-menu-item的背景颜色。 What is Expected? 当点击一个el-menu-item后,背景变色,但会立即或不久消失; 当点击另外的el-menu-item时,之前所点击的el-menu-item样式应该回复原状。 What is actually happening?
UE+ElementUI更改导航菜单选中背景颜色 主要是设置 .el-menu-item.is-active 选择器的样式属性 官方文档中提供background-color、text-color、active-text-color三种属性 仅提供了激活菜单文字颜色,并没有提供激活菜单的其他参数 <el-menudefault-active="0"class="el-menu-vertical-demo"@open="handleOpen"@close...
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="200...
解决方案就是我们不使用这个语句了,然后给禁用项加上cursor: not-allowed;就会出现鼠标悬浮禁用样式。 <style lang="less" scoped> /deep/ .el-dropdown-menu__item.is-disabled { pointer-events: auto !important; cursor: not-allowed; } </style> 不过会产生一个新问题,就是:禁用项的样式虽然是有了,但...
选某选的第一个,其它的项第一个的文字颜色也跟着一起修改了,这是哪里设置错了? <el-menu class="el-menu-vertical-demo" @open="menuChange" @select="gotoUrl" @close="handleClose" background-color="#304156" text-color="#BFCBD9" active-text-color="#1890ff"> <div v-for="(item, index) ...
解决方案就是我们不使用这个语句了,然后给禁用项加上cursor: not-allowed;就会出现鼠标悬浮禁用样式。 <style lang="less" scoped> /deep/ .el-dropdown-menu__item.is-disabled { pointer-events: auto !important; cursor: not-allowed; } </style> ...