小编sid*_*ara的帖子

删除antd select组件上的轮廓

我正在使用 antd NPM 包的 Select 组件。我想删除聚焦组件时出现的蓝色轮廓。我怎样才能删除它?

我尝试使用样式组件来设置组件样式。样式如下所示:

const StyledSelect = styled(Select)`

    & .ant-select-selection__rendered {
        width: 200px;
        margin-left: 0;
        margin-right: 0;
        &:focus {
          outline: none;
          border: none;
        }
    }
    &.ant-select-focused {
      border: none;
      &:focus{
        outline: 0;
      }
    }
`;
Run Code Online (Sandbox Code Playgroud)

我希望删除蓝色轮廓。但我的造型似乎不起作用

reactjs styled-components antd

3
推荐指数
2
解决办法
4931
查看次数

标签 统计

antd ×1

reactjs ×1

styled-components ×1