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

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

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

相关推荐
前端技术官1 小时前
Web Components 为什么火不起来?
react·web components·ssr·shadow dom·custom elements
钛态2 小时前
Vite 中的 CSS 工程化:从 CSS Modules 到 UnoCSS 的渐进式迁移
前端·vue·react·web
circuitsosk15 小时前
智能体任务拆解与执行:基于ReAct+Plan-and-Execute框架的行业Skill构建实录
前端·javascript·python·react.js·react·llm agent·智能体编排
名字还没想好☜4 天前
Next.js 用 cookies()/headers() 读请求信息:动态渲染触发、缓存失效与在 Server Action 里读写 cookie
前端·javascript·缓存·react·next.js·app router
DsirNg4 天前
先守住数据,再下沉交互:RSC 组件分层的实战决策法
react·next.js·app router·前端架构·组件设计·react server components·server actions
递归尽头是星辰4 天前
大模型 Agent 知识体系:Java 开发者视角下的原理、架构与选型边界
react·智能体·spring ai·java 后端·大模型 agent
名字还没想好☜7 天前
Next.js Route Handler 做 SSE 服务端推送:实时进度条、自动重连与什么时候别用 WebSocket
开发语言·javascript·websocket·react·sse·next.js
Richown8 天前
AI + Web3 融合架构:大模型驱动的智能合约自动生成与审计
区块链·react
名字还没想好☜9 天前
React 19 useOptimistic 实战:点赞评论先更新 UI,失败自动回滚
前端·javascript·react.js·ui·react·useoptimistic
名字还没想好☜10 天前
Next.js 用 Server Components 直连数据库:去掉 API 层的边界,和三条别踩的安全红线
前端·javascript·数据库·安全·react·next.js