实现圆弧切角的 css 方案
想知道如何实现这种一边切角一边圆角的边框吗?别急,我们可以使用径向渐变来轻松实现。
步骤:
示例代码:
立即学习“前端免费学习笔记(深入)”;
<div class="cor">202201马勒卡</div>
.cor { line-height: 48px; padding: 0 20px 0 30px; background: radial-gradient(circle at -30px center, transparent 40px, orange 0); border-radius: 0 30px 30px 0; color: #fff; }
自定义调整:
你可以微调代码中的中心点和渐变颜色,以便调整切角的形状和大小。
效果:
<div class="cor">202201马勒卡</div>202201马勒卡马勒卡马勒卡
.cor { line-height: 48px; padding: 0 20px 0 30px; background: radial-gradient(circle at -30px center, transparent 40px, orange 0); border-radius: 0 30px 30px 0; color: #fff; }
以上就是CSS 圆弧切角怎么做?的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号