记录 element 修改样式

element input 和 el-date-picker、el-select

::v-deep .el-select {
  width: 135px;
  margin-right: 10px;
}
::v-deep.el-input {
  width: 90%;
}
/deep/ .el-input-group__append {
  border-right: 1px solid rgb(48, 14, 240);
  border-top: 1px solid rgb(48, 14, 240);
  border-bottom: 1px solid rgb(48, 14, 240);
}
/deep/.el-input__inner,
/deep/.el-range-input {
  background: #2479ef;
  border: none !important;
  color: #ffffff !important;
}
/deep/input::-webkit-input-placeholder {
  color: rgb(255, 255, 255) !important;
}
/deep/.el-select__caret {
  color: #fff !important;
}
/deep/.el-range-separator {
  color: #fff;
  padding: 0;
}
/deep/.el-input__icon {
  color: #fff;
}

element plus表格

::v-deep .el-table {
  background: transparent !important;
}
::v-deep .el-table--enable-row-hover .el-table__body tr:hover > td {
  background: rgba(19, 28, 41, 0.5);
  cursor: pointer;
}
::v-deep .el-table tr,
.el-table td {
  background: transparent !important;
  color: #ffffff;
}
::v-deep .el-table th {
  background-color: #2765bb; /* 设置表头背景色为浅灰色 */
  .cell {
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center;
  }
}

/* 修改所有表格边框颜色 */
::v-deep .el-table--border,
::v-deep .el-table--group,
::v-deep .el-table td.el-table__cell,
::v-deep .el-table th.el-table__cell.is-leaf,
::v-deep .el-table__footer-wrapper td.el-table__cell {
  border-color: #3cc5e7 !important;
}
::v-deep .el-table--border::after {
  background: #3cc5e7;
}
/* 移除伪元素对底部边框的影响 */
::v-deep .el-table--group::after,
::v-deep .el-table::before {
  background-color: transparent !important;
}
::v-deep .el-table__border-left-patch,
::v-deep .el-table__inner-wrapper:before,
::v-deep .el-table--border .el-table__inner-wrapper:after {
  background: #3cc5e7 !important;
}

滚动条

/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/

::-webkit-scrollbar {
  /* width: 0px; */
  /* height:0px; */
  width: 7px;
  height: 7px;
  background-color: transparent;
}


/*定义滚动条轨道 内阴影+圆角*/

::-webkit-scrollbar-track {
  box-shadow: inset 0 0 6px rgba(62, 186, 247, 0.3);
  -webkit-box-shadow: inset 0 0 6px rgba(62, 186, 247, 0.3);
  border-radius: 10px;
  background-color: transparent;
}

/*定义滑块 内阴影+圆角*/

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  box-shadow: inset 0 0 6px rgba(62, 186, 247, 0.3);
  -webkit-box-shadow: inset 0 0 6px rgba(62, 186, 247, 0.3);
  background-color: transparent;
}

el-radio

.el-radio {

  // 默认文本样式
  .el-radio__label {
    font-family: PingFangSC-Regular;
    font-size: 14px;
    color: #ffffff;
    font-weight: 400;
  }

  // icon 默认样式
  .el-radio__inner {
    background: #000c17;
    border: 1px solid rgb(22, 151, 165);
  }

  // 选中文本样式
  .el-radio__input.is-checked+.el-radio__label {
    font-family: PingFangSC-Semibold;
    font-size: 14px;
    color: #00ffff;
    font-weight: 500;
  }

  // 选中 icon 样式
  .el-radio__inner::after {
    width: 8px;
    height: 8px;
    background-color: #00ffff;
  }

  // 覆盖默认 样式
  .el-radio__input.is-checked .el-radio__inner {
    border: 1px solid #00ffff;
    background-color: transparent;
  }
}

input-placeholder

input::-webkit-input-placeholder {
  -webkit-text-fill-color: #fff !important;
  color: #fff !important;
}

textarea文本域

.el-textarea__inner::-webkit-input-placeholder {
  -webkit-text-fill-color: #000 !important;
  color: #000 !important;
}

el-table

/deep/.has-gutter {
  th {
    background: #0c3587;
    color: #89eaff;
    border: none !important;
  }
}
/deep/.el-table {
  background: transparent !important;
}

/deep/.el-table::before {
  height: 0px;
}

/deep/.el-table--enable-row-hover .el-table__body tr:hover>td {
  background: rgba(19, 28, 41, 0.5);
  cursor: pointer;
}

/deep/.el-table tr,
.el-table td {
  background: transparent !important;
  color: #ffffff;
}

/deep/.el-table td.el-table__cell {
  border-color: #0b2e7a;
}

滚动条

/*滚动条整体粗细样式*/
::-webkit-scrollbar {
  /*高宽分别对应横竖滚动条的尺寸*/
  width: 6px;
  height: 8px;
}

/*滚动条里面小方块*/
::-webkit-scrollbar-thumb {
  border-radius: 10px !important;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
  /* 颜色 */
  background: #25b7fa !important;
}

/*滚动条轨道*/
::-webkit-scrollbar-track {
  border-radius: 10px !important;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
  background: #3e8ae2 !important;
}

element Plus select

::v-deep .el-select__wrapper {
  background: #01326f !important;
  color: #fff !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid #0094FF;
}
::v-deep .el-select__suffix {
  background: #0094ff;
  height: 22px;
  width: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  i {
    color: #fff !important;
  }
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容