使用 window.getComputedStyle 方法 var item = document.querySelector(".item");console.log(window.getComputedStyle(item));