类似渐变色弯曲border

类似渐变色弯曲border

因为border-imageborder-radius 不能同时生效。所以使用双层背景实现。注:class属性使用了tailwindcss

  • 实现效果
  • 实现代码
html 复制代码
<div
  class="ml-6 flex h-14 items-center rounded-full border-2 border-transparent px-5"
  style="
    background:
      linear-gradient(#fff, #fff) padding-box,
      linear-gradient(#8362ff, #ff6b6e) border-box;
  "
>
  <span class="bg-gradient-to-r from-[#8362FF] to-[#FF6B6E] bg-clip-text text-lg font-bold whitespace-nowrap text-transparent"> 发起新对话 </span>
</div>
相关推荐
Csvn13 小时前
CSS :has() 选择器实战:没有它之前我们写了多少冗余 JS
前端·css
用户059540174462 天前
大模型长上下文遗忘排查实录:用 Playwright 自动化测试,揪出了 90% 的存储序列化 bug
前端·css
天蓝色的鱼鱼2 天前
关于 CSS 你可能不知道的属性,但关键时刻很有用
前端·css
用户059540174463 天前
向量库静默丢数据踩坑实录:Playwright 端到端测试让我排查了72小时
前端·css
ZhengEnCi3 天前
Q06-导航按钮高级拟态玻璃效果构建完全指南
前端·css
用户059540174464 天前
Redis持久化踩坑实录:这个数据丢失Bug让我排查了6小时
前端·css
用户059540174465 天前
Redis记忆存储故障恢复测试踩坑实录:手动测试让我漏掉了2个一致性Bug
前端·css
用户059540174465 天前
用了3年Mock,才发现Redis记忆存储的测试一直漏掉了60%的边界场景
前端·css
用户059540174466 天前
用了6个月LangChain,才发现AI Agent的记忆存储一直有坑——写了23个Pytest用例才彻底修好
前端·css
用户059540174466 天前
把LLM记忆测试从手工脚本换成Pytest参数化,回归时间从2小时降到10分钟
前端·css