可以通过以下方式设置el-menu-item鼠标悬浮后的颜色和字体粗细:

  1. 设置鼠标悬浮后的颜色:

在样式中添加如下代码:

.el-menu-item:hover {
  background-color: #f5f5f5; /* 设置背景颜色 */
  color: #333; /* 设置字体颜色 */
}
  1. 设置字体变粗:

在样式中添加如下代码:

.el-menu-item {
  font-weight: normal; /* 设置字体为正常 */
}

.el-menu-item:hover {
  font-weight: bold; /* 设置字体为粗体 */
}

其中,.el-menu-item表示el-menu-item元素的样式,:hover表示鼠标悬浮时的样式效果。font-weight属性用于设置字体粗细,normal表示正常字体,bold表示粗体字。

怎么配置el-menu-item鼠标悬浮后的颜色还有字体如何设置变粗

原文地址: https://www.cveoy.top/t/topic/dUaJ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录