[JS]jQuery 좌표속성

K00·2022년 11월 1일
0

jQuery의 높이 구하기

$('.box').height()          //요소(element)의 높이
$('.box').innerHeight()     //요소의 padding을 포함한 높이 
$('.box').outerHeight()     //요소의 border, padding을 포함한 높이
$('.box').outerHeight(true) //요소의 margin, border, padding포함한 높이
$('.box').height(300)       //요소의 높이를 설정함

jQuery의 넓이 구하기

$('.box').width()           //요소(element)의 넓이
$('.box').innerWidth()      //요소의 padding을 포함한 넓이 
$('.box').outerWidth()      //요소의 border, padding을 포함한 넓이
$('.box').outerWidth(true)  //요소의 margin, border, padding포함한 넓이
$('.box').width(300)        //요소의 넓이를 설정함

0개의 댓글