getComputedStyle 이용하면 css 속성을 js에서 부를수 있다

2021. 11. 27. 10:29카테고리 없음

const bg = getComputedStyle(box).backgroundColor;

const wid = getComputedStyle(box).width;console.log(bg);console.log(wid);