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"/>

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

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

相关推荐
SamChan907 小时前
WebSocket实现PDF翻译进度实时推送:Go后端+React前端的完整方案
前端·websocket·pdf·c#·react·机器翻译
名字还没想好☜8 小时前
React 受控输入框光标跳到末尾:格式化输入时的 selection 丢失 bug 与修复
前端·javascript·react.js·bug·react·next.js
名字还没想好☜1 天前
Next.js App Router 约定式文件实战:loading、error、not-found 怎么兜住加载态与异常
开发语言·前端·javascript·react·next.js
名字还没想好☜2 天前
React createPortal 实战:模态框逃出 overflow:hidden、事件冒泡与焦点管理
前端·javascript·react.js·ecmascript·react·createportal
人间凡尔赛4 天前
2026 前端全栈开发新范式:React Compiler + Signals + RSC 实战指南
前端·性能优化·react·全栈·signals·rsc
linsk19984 天前
React18、19如何兼容 IE9、IE10
react·rollup·vite·兼容·ie
李燚5 天前
ReAct Agent 源码拆解:Eino 如何把 Graph 变成 Agent(第64篇-E50)
ai·agent·react·graph·multi-agent·aiagent·eino
zhoupenghui1686 天前
大模型核心技术ReAct和Agentic RAG讲解
人工智能·ai·大模型·react·rag·动态推理·agentic rag
人间凡尔赛7 天前
React Compiler + Server Components 实战:2026 前端全栈开发新范式
typescript·react·next.js·全栈开发·react compiler·server components
人间凡尔赛9 天前
2026 年 React Server Components 完全指南:Next.js 16 全栈开发最佳实践
前端·typescript·react·全栈·next.js