CSS常用渐变

时间:2023-12-20 13:45:56

边框渐变:

 border-image: -webkit-linear-gradient( red , blue) 30 30;
border-image: -moz-linear-gradient( red, blue) 30 30;
border-image: linear-gradient( red , blue) 30 30;

CSS常用渐变

文字渐变:(只支持-webkit-)

 background-image: -webkit-gradient(linear, 0 0, 0 80%, from(nth($color7, 3)), to(nth($color7, 4)));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;

CSS常用渐变

背景渐变:

 filter: alpha(opacity=100 finishopacity=50 style=1 startx=0,starty=0,finishx=0,finishy=150) progid:DXImageTransform.Microsoft.gradient(startcolorstr=red,endcolorstr=blue,gradientType=0);
-ms-filter: alpha(opacity=100 finishopacity=50 style=1 startx=0,starty=0,finishx=0,finishy=150) progid:DXImageTransform.Microsoft.gradient(startcolorstr=red,endcolorstr=blue,gradientType=0);
background: red; /* 一些不支持背景渐变的浏览器 */
background: -moz-linear-gradient(top, red, blue);
background: -webkit-gradient(linear, 0 0, 0 bottom, from(red), to(blue));

CSS常用渐变