You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the method of baidu.dom.opacity, and it set the opacity using filter with 'xxxxx(opacity__:xxx' instead of 'xxxxx(opacity=__'.
The problem is that if I set the opacity with this method, but I want to get the opacity using the baidu.dom.getStyle, and it won't work.
Frankly speaking, I can't figure out why there exists a method calling baidu.dom.opacity, do you want to provide a shortcut method? or other reasons?
baidu.dom.opacity=function(element,opacity){element=baidu.dom.g(element);if(!baidu.browser.ie){element.style.opacity=opacity;element.style.KHTMLOpacity=opacity;}else{element.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity:"+Math.floor(opacity*100)+")";}};baidu.dom._styleFixer.opacity=baidu.browser.ie ? {get: function(element){varfilter=element.style.filter;returnfilter&&filter.indexOf("opacity=")>=0 ? (parseFloat(filter.match(/opacity=([^)]*)/)[1])/100)+"" : "1";},set: function(element,value){varstyle=element.style;// 只能Quirks Mode下面生效??style.filter=(style.filter||"").replace(/alpha\([^\)]*\)/gi,"")+(value==1 ? "" : "alpha(opacity="+value*100+")");// IE filters only apply to elements with "layout."style.zoom=1;}} : null;
thanks,
starandtina
The text was updated successfully, but these errors were encountered:
In the method of baidu.dom.opacity, and it set the opacity using filter with 'xxxxx(opacity__:xxx' instead of 'xxxxx(opacity=__'.
The problem is that if I set the opacity with this method, but I want to get the opacity using the baidu.dom.getStyle, and it won't work.
Frankly speaking, I can't figure out why there exists a method calling baidu.dom.opacity, do you want to provide a shortcut method? or other reasons?
thanks,
starandtina
The text was updated successfully, but these errors were encountered: