线性渐变
background-image:linear-gradient(方位,起始色,末尾色)
方位:to top , to bottom , to right , to left , 45deg ,
background-image:linear-gradient(方位,起始色 20px/20px,末尾色 70px/80%)
还可以设置结束开始位置
径向渐变
background-image:radial-gradient( 形状,颜色1,颜色2 ... )
形状:circle at center/top/bottom/top left…
ellipse at center/top/bottom/top left…
(20px circle at center,颜色1 ,颜色2…)
( 20px 30px ellipse at center , 颜色1,颜色2…)
重复性渐变
background-image:repeating-linear-gradient(方位,起始色,末尾色)
线性重复渐变
background-image:repeating-radial-gradient( 形状,颜色1,颜色2 ... )
径向重复渐变