vue2-elementUI部分组件样式修改

el-radio样式:

复制代码
/deep/ .el-radio__input .el-radio__inner {
  width: 20px;
  height: 20px;
  position: relative;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: 1px solid #999;
  border-radius: 0;
  outline: none;
  transition: all 0.3s ease-in-out;
  box-sizing: border-box;
  cursor: pointer;
}

/* 选中后的字体颜色 */
/deep/ .el-radio__input.is-checked+.el-radio__label {
  color: #7e6934 !important;
}

/* 选中后圆圈的背景颜色 */
/deep/ .el-radio__input.is-checked .el-radio__inner {
  background: #7e6934 !important;
  border-color: #7e6934 !important;
}

// 选中后的样式
/deep/ .el-radio__input.is-checked .el-radio__inner::after {
  width: 20px;
  height: 20px;
  display: inline-block;
  visibility: visible;
  padding-left: 0;
  text-align: center;
  content: "✓";
  color: #fff;
  font-size: 10px;
  line-height: 20px;
  border-radius: 0;
  background-color: #88733c;
}

el-input:改变选中时的边框颜色

复制代码
/deep/.el-input__inner:focus {
  border-color: #88733c
}

el-select:改变选中时的边框、文本颜色

复制代码
// 选择框选中时的边框颜色
/deep/.el-select .el-input.is-focus .el-input__inner {
  border-color: #88733c !important;
}

//选择框选中又取消时的边框颜色
/deep/.el-select .el-input__inner:focus {
  border-color: #88733c !important;
}

// 选择框选中的文本颜色
.el-select-dropdown__item.selected {
  color: #88733c;
}

设置下拉选择框未选中时的提示文字

复制代码
<el-select placeholder="月份*"></el-select>

el-select下拉框样式:

1、 在需要调整的 el-select 组件中设置

复制代码
:popper-append-to-body="false"

<el-select :popper-append-to-body="false"></el-select>
  1. 样式修改

    //修改总体选项的样式 最外层
    /deep/ .el-select-dropdown {
    padding-left: 4%;
    border-radius: 0px;
    position: static !important;
    border-color: #fff;
    width: 257%;
    border-bottom: 2px solid #7e6934;
    box-shadow: none;
    }

    /deep/ .el-select-dropdown__list {
    display: flex;
    flex-wrap: wrap;
    }

    //修改单个的选项的样式
    /deep/ .el-select-dropdown__item {
    width: 30%;
    height: 3rem;
    line-height: 3rem;
    }

相关推荐
李明卫杭州几秒前
JavaScript 严格模式下 arguments 的区别
前端·javascript
swipe3 分钟前
向量数据库实战:为什么 AI Agent 离不开 Milvus
前端·面试·agent
小锋学长生活大爆炸13 分钟前
【教程】Edge浏览器中可以提升性能的flags
前端·edge
苍舒墨16 分钟前
如何借助Github pages部署React+vite静态前端项目
前端
曹牧25 分钟前
JSON 数组的正确使用方式
java·服务器·前端
一次旅行26 分钟前
今日心理学知识分享(三)
开发语言·javascript·程序人生·ecmascript
小村儿1 小时前
一起吃透 Claude Code,告别 AI 编程迷茫
前端·后端·ai编程
牛十二1 小时前
openclaw安装mcporter搜索小红书
开发语言·javascript·ecmascript
小金鱼Y1 小时前
🔥 前端人必看:浏览器安全核心知识点全解析(XSS/CSRF/DDoS)
前端·javascript·安全
时寒的笔记1 小时前
js逆向05_ob混淆花指令,平坦流,某麦网(突破ob混淆寻找拦截器)
开发语言·前端·javascript