로딩
요청 처리 중입니다...

Dimensions, 창의 크기 다루기

 Dimensions, 창의 크기 다루기

** dimensions 이란?? 요소 및 브라우저 창의 크기를 가져오거나 설정하기 위한 여러 메서드를 제공 1. width() 및 height() : 요소의 너비 및 높이를 가져오거나 설정한다. : 패딩(padding), 테두리(border), 마진(margin)은 포함하지 않는다.

$(document).ready(function(){ $("button").click(function(){ var txt = ""; txt += 'width:' + $("div").width() + 'px'+ ""; txt += 'height:' + $("div").height() + 'px'; $("div").html(txt); }); }); div { height: 100px; width: 300px; padding: 10px; margin: 3px; border: 1px solid blue; background-color: skyblue; ...

# dimensions # width # 너비 # 높이 # 메서드 # 반환 # 브라우저 # 설정 # 요소 # top # position # height # innerHeight # innerWidth # jQuery # left # offset # outerHeight # outerWidht # 창의_크기