线性渐变(Linear Gradients)
语法
background: linear-gradient(angle, color-stop1, color-stop2, 3 ,4 ,5…);
angle属性说明:
0度是由下向上渐变;
关键词:
to top0degto right90degto bottom180degto left-90deg
径向渐变
语法
background: radial-gradient([position], [shape] [size], color-stop, color-stop…);
属性说明
position渐变的中心shape形状(圆形(circle)、椭圆(ellipse)size渐变的大小closest-side从圆心到距离圆心最近的边closest-corner最近的角farthest-side最远的边farthest-corner最远的角

京公网安备 11010502036488号