在工作中会用到很多得第三方组件库比如element ui 以及antd 那么在工作中经常会对这第三方组件库得组件进行自定义。
在antd组件库里select 组件在样式修改中有一个隐藏得问题非常棘手得问题,在边框为1px 时不会出现任何问题,但是如果修改为2px 以及其他时有边框会出现抖动,这事因为作者把这个css值设置得有点奇怪,作者把右边框强制设置为 1Px 所以会有问题 按照一下修改就可以了
.ant-select-selection:hover{
border-right: 2px solid #8a8f9d !important;
}
.ant-select-selection:active{
border-right: 2px solid #8a8f9d !important;
}
.ant-select-selection:focus{
border-right: 2px solid #8a8f9d !important;
}