根据caniuse(http://caniuse.com/#search=gradient),rgba兼容性为IE10以及以上浏览器。 实例代码: 1 <!doctype html> 2 <html lang="en"> 3 ...
根据caniuse(http://caniuse.com/#search=gradient),rgba兼容性为IE10以及以上浏览器。
实例代码:
1 <!doctype html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8" /> 6 <title>gradient 兼容性处理</title> 7 <style type="text/css"> 8 * { 9 margin: 0;10 padding: 0;11 }12 13 .parent {14 width: 400px;15 height: 400px;16 margin: 100px;17 font-size: 20px;18 color: #FF0000;19 border: 1px solid red;20 background: #000000;21 background: -moz-linear-gradient(top, #000000 0%, #ffffff 100%);22 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #000000), color-stop(100%, #ffffff));23 background: -webkit-linear-gradient(top, #000000 0%, #ffffff 100%);24 background: -o-linear-gradient(top, #000000 0%, #ffffff 100%);25 background: -ms-linear-gradient(top, #000000 0%, #ffffff 100%);26 background: linear-gradient(to bottom, #000000 0%, #ffffff 100%);27 }28 </style>29 </head>30 31 <body>32 <div class="parent">33 </div>34 </body>35 36 </html>
原标题:gradient渐变IE兼容处理
关键词:ie
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。