css3背景和border渐变色写法(做记录,方便以后查看)
<div id="box">
</div>
css
#box {
height: 100px;
position: relative;
border: 7px solid transparent;
border-radius: 16px;
background: linear-gradient(180deg, #F85781 0%, #FFAFA8 82%);
background-clip: padding-box;
padding: 10px;
/* just to show box-shadow still works fine */
}
#box::after {
position: absolute;
top: -7px;
bottom: -7px;
left: -7px;
right: -7px;
background: linear-gradient(#FFEADB, #FFE2A4);
content: '';
z-index: -1;
border-radius: 16px;
}