设置 border-image渐变色后,再设置border-radius不生效,强行写渐变色border样式

不生效原因?

这是一个已知的问题,同时设置 border-image 浙变色和 border-radius 时,border-radius 会被 border-image 覆盖,导致设置无效 (是吗是吗是吗是吗是吗是吗)

实现目标样式(哦_豁)

哈哈我是图片

<div class="abc">
    <div class="def">
        <div class="ghi">
            航行轨迹
        </div>
    </div>
</div>
// 最外层第一个盒子
.abc {
    width: 200px;
    height: 50px;
    background: linear-gradient(to right, #28BCED, #2062E9);
    border-radius: 50px;
    position: relative;
}
// 第2个盒子
.def {
    width: 196px;
    height: 46px;
    background: linear-gradient(to right, #45538b, #1F358D);
    border-radius: 50px;
    position: absolute;
    top: 2px;
    left: 2px;
}
// 第3个盒子
.ghi {
    width: 194px;
    height: 44px;
    background: linear-gradient(to right, #45538b, #1F358D);
    border-radius: 50px;
    border: 1px dashed #28A6E5;
    position: absolute;
    top: 1px;
    left: 1px;
    // 文字样式
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值