"JQuery CSS 속성 변경"의 두 판 사이의 차이

잔글 (211.231.196.1(토론)의 편집을 Jmnote의 마지막 판으로 되돌림)
잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(사용자 2명의 중간 판 2개는 보이지 않습니다)
5번째 줄: 5번째 줄:


==예시 1==
==예시 1==
<source lang='html5'>
<syntaxhighlight lang='html5'>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script>
<script>
13번째 줄: 13번째 줄:
</script>
</script>
<body>안녕하세요</body>
<body>안녕하세요</body>
</source>
</syntaxhighlight>


==예시 2==
==예시 2==
<source lang='html5'>
<syntaxhighlight lang='html5'>
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
36번째 줄: 36번째 줄:
</body>
</body>
</html>
</html>
</source>
</syntaxhighlight>


*데모: http://zetawiki.com/ex/jquery/example03.php
*데모: http://zetawiki.com/ex/jquery/example03.php

2020년 11월 2일 (월) 02:53 기준 최신판

jQuery CSS 속성 변경
jQuery CSS 속성 바꾸기
jQuery 스타일 변경

1 예시 1[ | ]

<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script>
$(function(){
	$('body').css('background-color', 'red');
});
</script>
<body>안녕하세요</body>

2 예시 2[ | ]

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script>
$(function() {
  $("#hello").css("background","gold");
  $("input[type='button']")
    .css("border","solid 3px red")
    .css("background","pink");
});
</script>
</head>
<body>
<div id="hello">안녕</div>
<input type="button" value="친구들 버튼" />
</body>
</html>

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}