HTML:
<div id="box"></div>
JS:
let box = document.getElementById("box")
window.getComputedStyle( box ).width
window.getComputedStyle( box ).height
......
HTML:
<div id="box"></div>
JS:
let box = document.getElementById("box")
window.getComputedStyle( box ).width
window.getComputedStyle( box ).height
......
本文标题:getComputedStyle()获取元素一切样式属性
本文链接:https://www.haomeiwen.com/subject/stzrndtx.html
网友评论