【问题标题】:How to set border radius ant design如何设置边界半径蚂蚁设计
【发布时间】:2020-07-12 08:20:43
【问题描述】:

我正在使用 ant design,但不知道如何更改登录表单用户名和密码框边框半径。

这里是相关登录表单的链接。 https://codesandbox.io/s/rx2qf

【问题讨论】:

    标签: reactjs ant-design-pro


    【解决方案1】:

    使用内联样式设置 borderRadius 会起作用

    style={{borderRadius: '10px'}}
    
    <Input
      prefix={<LockOutlined className="site-form-item-icon" />}
      type="password"
      placeholder="Password"
      style={{borderRadius: '10px'}}
    />
    

    【讨论】:

      【解决方案2】:

      在他们的文档中检查这个 https://ant.design/docs/react/customize-theme#Ant-Design-Less-variables

      如果你使用较少,你可以设置@border-radius-base

      如果不是自己在css文件中设置的话

      .ant-input-affix-wrapper {
         border-radius: 5px;   // or other value
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-05-11
        • 2021-12-12
        • 2019-04-06
        • 2020-08-21
        • 2022-12-29
        • 1970-01-01
        • 1970-01-01
        • 2020-09-03
        相关资源
        最近更新 更多