在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML5/ CSS中 border 用了border的漸變 為什么就不能用radius圓角了

CSS中 border 用了border的漸變 為什么就不能用radius圓角了

CSS中 border 用了radius圓角 為什么就不能用border的漸變了

回答
編輯回答
不舍棄
.grounded-radiants {
    position: relative;
    border: 4px solid transparent;
    border-radius: 16px;
    background: linear-gradient(orange, violet);
    background-clip: padding-box;
    padding: 10px;
    /* just to show box-shadow still works fine */
    box-shadow: 0 3px 9px black, inset 0 0 9px white;
}

.grounded-radiants::after {
    position: absolute;
    top: -4px; bottom: -4px;
    left: -4px; right: -4px;
    background: linear-gradient(red, blue);
    content: '';
    z-index: -1;
    border-radius: 16px;
}
<p class="grounded-radiants">
    Some text is here.<br/>
    There's even a line break!<br/>
    so cool.
</p>

抱歉抱歉,審題不嚴(yán)謹(jǐn),貌似只能通過偽元素添加 background 的方式實(shí)現(xiàn)

2017年2月19日 15:06