12

作者: 渣渣曾 | 来源:发表于2018-11-13 19:17 被阅读0次

透明度:
opacity:0.3; //ff chrom 高级浏览器
filter:alpha(opacity=30); //IE
设置透明度的时候也是具有兼容性的:

获取行间样式:
obj.style.属性
obj.style[属性]
获取非行间样式:(具有兼容性)
getComputedStyle(obj,null)[属性] // chrome
obj.currentStyle(属性) //IE

document.all 获取页面所有元素的集合。 在IE返回的是true,其他浏览器返回的是false。

function getStyle(obj,style){
if(obj.currentStyle){
return obj.currentStyle[style];
}else{
return getComputedStyle(obj,null)[style];
}
}
这是下一次测试的内容。

相关文章

网友评论

      本文标题:12

      本文链接:https://www.haomeiwen.com/subject/lzalfqtx.html