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

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

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

相关推荐
Richown11 小时前
AI + Web3 融合架构:大模型驱动的智能合约自动生成与审计
区块链·react
名字还没想好☜17 小时前
React 19 useOptimistic 实战:点赞评论先更新 UI,失败自动回滚
前端·javascript·react.js·ui·react·useoptimistic
名字还没想好☜2 天前
Next.js 用 Server Components 直连数据库:去掉 API 层的边界,和三条别踩的安全红线
前端·javascript·数据库·安全·react·next.js
名字还没想好☜3 天前
React 用自定义 useDebounce Hook 治好搜索框频繁请求:防抖、竞态取消与卸载清理
前端·javascript·react.js·react·hooks
DsirNg3 天前
React Server Components 在真实项目中的边界:哪些组件该放在服务端
性能优化·react·next.js·app router·前端架构·rsc·react server components
名字还没想好☜3 天前
React 用 useEffect 做轮询实战:setInterval 拿到旧 state 的闭包陷阱与正确清理
前端·javascript·react.js·react·useeffect
小田学Python4 天前
Agent 的运行范式:ReAct(Reasoning+Acting)
大模型·react·ai agent·工具调用
张彦峰ZYF5 天前
LangGraph 深入理解 ReAct:让 AI Agent 真正学会「边想边做」
人工智能·llm·agent·react·langgroup
满栀5855 天前
react动态路由内容修改
前端·javascript·react.js·typescript·react
console.log('npc')8 天前
Mock 服务设计指南
前端框架·mock·react·visual studio·项目架构