支持IE的css渐变色设置
FILTER: progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#EEEEEE', endColorstr='#ffffff');
GradientType=0:垂直渐变, GradientType=1:默认值,水平渐变。
支持Firefox的css渐变色设置
background:-moz-linear-gradient(top, #EEEEEE, #ffffff);/*Firefox*/
top:表示由上到下渐变,其它参数可以是left、right、bottom
支持Safari、Chrome的css渐变色设置
background:-webkit-gradient(linear, 0 0, 0 bottom, from(#EEEEEE), to(#ffffff));/*Safari 、Chrome*/
如果要兼容多种浏览器,把上面的几种综合起来,看下面例子
"); }; //check document ready function docReady(t) { "complete" === document.readyState || "interactive" === document.readyState ? setTimeout(t, 1) : document.addEventListener("DOMContentLoaded", t); } //check if wwads' fire function was blocked after document is ready with 3s timeout (waiting the ad loading) docReady(function () { setTimeout(function () { if( window._AdBlockInit === undefined ){ ABDetected(); } }, 3000); });