yeji

jQuery / width(), innerWidth(), outerWidth() 비교 본문

JavaScript

jQuery / width(), innerWidth(), outerWidth() 비교

yeji717 2021. 4. 6. 14:42

 

  • 기본 크기

     - $대상.width()

     - $대상.height() 

 

  • 기본 크기 + padding

     - $대상.innerWidth()

     - $대상.innerHeight()

 

  • 기본 크기 + padding + border

     - $대상.outerWidth()

     - $대상.outerHeight()

 

  • 기본 크기 + padding + border + margin

     - $대상.outerWidth(true)

     - $대상.outerHeight(true)

 

 

 

[참고자료] 자바스크립트 + jQuery 완전정복 스터디 도서

'JavaScript' 카테고리의 다른 글

Top 버튼 만들기  (0) 2021.11.15
setTimeout, setInterval, clearInterval  (0) 2021.04.06
getBoundingClientRect()  (0) 2021.01.26
eq() / index() / eq(index)  (0) 2020.06.09
event.preventDefault() 란?  (0) 2020.06.09
Comments