html5 - css3 怎么实现border-image圆角的问题
大家讲道理
大家讲道理 2017-04-17 13:40:45
[HTML讨论组]

.border {
    width: 100px;
    height: 100px;
    background: #6CF;
    border: 6px solid #F33;
    margin: 20px auto;
    border-image: linear-gradient(to top, red, orange, yellow) 6;
    -moz-border-radius: 15px 25px !important;
    -webkit-border-radius: 15px 25px !important;
    border-radius: 15px 25px !important;
}

用border-image写了一个渐变,同时想要写一个圆角,写了border-radius但是并无作用,border-image不能实现圆角功能么

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

全部回复(3)
PHP中文网

再嵌套一层,设置外层的圆角 + overflow:hidden

怪我咯

.border{

width:90px;
height:90px;
border:15px solid #F33;
margin:20px auto;
border-image:linear-gradient(to top, red, orange, yellow) 25;
border-radius:25px;
position:relative;

}
.border::after{

content:"";
width:100px;
height:100px;
position:absolute;
top:-5px;
left:-5px;
z-index:10;
border-radius:15px;
background-color:#6CF;

}

巴扎黑

border-radius
这个可以吧 我映象中一直用这个

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号