Antd search input无中框

发现input.search, 搜索图标的左侧有个竖线,不是很好看

把它改掉, 新建一个自己的CSS

javascript 复制代码
.custom-search-input{
    .ant-input-affix-wrapper{
      border-right: none !important;
    }
    .ant-input-group-addon{
      .ant-btn{
        border-left: none !important;
      }
    }
  }

应用

javascript 复制代码
<Search placeholder="input search text" className="custom-search-input"/>

就会发现中间的竖框没有了

如果有帮助到你,能点个赞嘛!!谢谢!!!

相关推荐
FungLeo1 小时前
成为全栈·React 管理后台篇·服务端状态、会话状态、界面状态:不要都塞进 Zustand
react·状态管理·zustand·react hook form·成为全栈·tanstack query
FungLeo4 小时前
成为全栈·React 管理后台篇·前端鉴权闭环:内存令牌、刷新旋转与路由守卫
react·路由守卫·zustand·刷新令牌·成为全栈·前端鉴权
余槐i1 天前
从useState到Agent状态:React状态管理为何在AI工作流中失灵?
react·状态管理·ai agent·langgraph·tool calling
liangshanbo12151 天前
React useTransition 和 useDeferredValue 面试题整理
react·usetransition
梦想的颜色1 天前
【AI科普】AI 时代,纯 H5+CSS PK React & Vue:前端技术孰优孰劣深入剖析
ai·前端框架·大模型·vue·react·html5·vibecoding
liangshanbo12152 天前
面试题:React 中 useReducer 和 useState 有什么区别?什么时候应该使用 useReducer?
react·usereducer
FungLeo2 天前
成为全栈·React 管理后台篇·后台骨架:布局、数据路由与分层守卫
react·管理后台·权限控制·react router·前端路由·成为全栈
秋秋小事2 天前
React hooks总览
react
西瓜太郎12345 天前
外层模型卡片与分组详情成功率不一致,应该怎么排查?
前端·typescript·go·软件工程·react
星辰徐哥5 天前
本地视频预览别只自己看:把Remotion动效项目发给客户远程验收
docker·ai·node.js·html·音视频·react·remotion