jQuery 엘리먼트 크기 / 위치 박스의 width = 0 박스의 height = 0 박스의 innerWidth = 0 박스의 innerHeight = 0 박스의 outerWidth = 0 박스의 outerHeight = 0 $(document).ready(function(){var box = $('#box');$(window).resize(function(){$('#width').text(box.width());$('#height').text(box. height());$('#innerWidth').text(box. innerWidth());$('#innerHeight').text(box. innerHeight());$('#outerWidth').text(box. outerWidth(false));$('#outerHeight').tex.. 더보기 jQuery 스타일 적용 ① 배경색 바꾸기 배경색 바꾸기. $(document).ready(function(){$(' #el' ).css( "background", 'yellow');}); // 배경색 바꾸기. ② 스타일 여러개 적용하기 여러개 스타일 적용. $(document).ready(function(){$(' #el' ).css( {"width:300, height:400, padding:10});;}); // 여러개 스타일 적용하기.// px 픽셀외에 단위는 "em" "%" 등등 은 문자열과 단위를 함께 작성해야함 ex) width:300% ③ 스타일 읽어오기 더보기 jQuery example html * { margin:0; padding:0; }body { padding:10px; margin-top:10px;}body span { color:red; font-size: 30px; }p { margin-bottom: 20px;}#wrapper { width:522px; margin:0 auto; text-align:center;}li { float: left; list-style: none; margin-left: 10px;overflow:hidden; width:123px; height:40px;}li.first { margin-left:0px; }li a {display:block; width:123px;}li a img {display:block;} #nav {width:522px; .. 더보기 이전 1 ··· 45 46 47 48 49 50 51 ··· 125 다음