0
点赞
收藏
分享

微信扫一扫

antd去除单选按钮Radio.Button被选中时的浅蓝色外边框阴影

卿卿如梦 2022-01-17 阅读 58

在使用antd的Radio.Group,Radio.Button的时候,被选中按钮的外圈有个浅蓝色的框框,想要去除:

 

这个时候打开控制台元素,选中该按钮,发现该元素的classname = ant-radio-button-wrapper-checked,去到antd.css文件,搜索该class,找到一个样式的颜色是浅蓝色:

将其覆盖为:

.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within {
        box-shadow: 0 0 0 3px transparent!important;
    }

即可。

举报

相关推荐

0 条评论