var ele = document.getElementById("eleid");
1:ele.style.元素名称
2:var style = window.getComputedStyle ? window.getComputedStyle(ele, null) : ele.currentStyle; style.元素名称;
https://www.zhangxinxu.com/wordpress/2012/05/getcomputedstyle-js-getpropertyvalue-currentstyle/