How to modify element native style

During the development process, if the native style of element does not match the requirements, you need to modify the native style

Method 1: [not recommended]

Remove the scoped in the style, select the class name in the style and modify it directly, but this will pollute the global style. [So this method is not recommended]

Method 2: [Write another style without scoped]

Vue supports multiple styles [that is to say, you can write one more style style] This style does not have scoped

Note: This method will cause your modified style to penetrate into subcomponents, which is inconvenient for subsequent maintenance and development

Method 3: Depth Selector [deep] Easy to use! ! !

Writing format: /deep/ 'class of the label to be modified'


/deep/.el-pager li.active {
  color: #fff;
}

Guess you like

Origin blog.csdn.net/m0_69644606/article/details/128066545