function getCss(ele,attr){
if(window.getComputedStyle){
return window.getComputedStyle(ele,null)[attr];
}else{
return ele.currentStyle[attr];
}
}
获得指定元素的css样式方法
最新推荐文章于 2021-08-03 18:20:24 发布
function getCss(ele,attr){
if(window.getComputedStyle){
return window.getComputedStyle(ele,null)[attr];
}else{
return ele.currentStyle[attr];
}
}