css中背景颜色渐变(从左到右)兼容各类浏览器
从左至右,颜色渐变,
兼容全部浏览器。
操作方法
- 01
兼容各类浏览器(一般是版本较高的浏览器),如谷歌、火狐........ background: -webkit-linear-gradient(left, #1edf17, #1edf17, #3ceded, #5d83ff); background: -o-linear-gradient(left,#1edf17, #1edf17, #3ceded, #5d83ff); background: -moz-linear-gradient(left,#1edf17, #1edf17, #3ceded, #5d83ff); background: -ms-linear-gradient(left,#1edf17, #1edf17, #3ceded, #5d83ff);
- 02
兼容IE5~IE9 filter:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#1edf17,endColorStr=#5d83ff);
- 03
兼容Safari4-5,chrome1-9 background: -webkit-gradient(linear, 0% 25%, 75% 100%, from(#1edf17), to(#0000ff));
赞 (0)