How does element-ui modify the height of the el-switch switch?

The width of

has attribute value, but the height is not. Can you only modify the source code?

clipboard.png

Mar.23,2021

you can add a class name to the outermost container, and then find the class name of the button in the console. You can add the height yourself. If it doesn't work, it may be because of scope. Just remove it


just modify it in your own css

.el-switch__core {
    height: 30px;// 
}

modify his style directly in his own css

>>>.el-switch__core
    height 15px
>>>.el-switch__core::after
    height 12px
    width 12px
Menu