js之: 获取css属性值
var time = document.getElementById('time') var getStyle = function(t, n) { var o = t.currentStyle ? t.currentStyle : window.getComputedStyle(t, null); return o[o.getPropertyValue ? "getPropertyValue" : "getAttribute"](n) } console.log(getStyle(time,'width'))