JavaScript - Element 에 적용된 CSS Style 가져오기
- Element.style.속성명 을 통해 적용중인 속성값 확인 : style속성에서 직접준것이 아닐 경우 확인 불가 - document.defaultView.getComputedStyle(Element) 를 통해 적용중인 Style 확인 가능 - 프로토타입의 게터에서 정보를 추출 : document.defaultView.getComputedStyle(Element).getPropertyValue("속성명")) 소스 DIV 입니다. 결과
개발/JavaScript
2020. 7. 15. 15:04