jquery 09 css() 메소드
프론트엔드/Jquery2021. 3. 18. 00:16
김길동
02-123-4567
이길동
042-567-2929
홍길동
051-278-9485
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function() {
$("p").css({"background-color": "yellow", "font-size" : "200%"});
});
});
</script>
</head>
<body>
<p>김길동</p>
<div>02-123-4567</div>
<p>이길동</p>
<div>042-567-2929</div>
<p>홍길동</p>
<div>051-278-9485</div>
<br></br>
<button>이름 강조</button>
</body>
</html>
'프론트엔드 > Jquery' 카테고리의 다른 글
jquery 11 이미지크기를 픽셀 종류별로 변경 (0) | 2021.03.18 |
---|---|
jquery 10 박스를 클릭하면 박스 크기와 색상이 변경 (0) | 2021.03.18 |
jquery 07 addClass()와 removeClass()메소드 (0) | 2021.03.18 |
jquery 06 mousedown()와 mouseup() 메소드 (0) | 2021.03.17 |
jquery 05 mouseenter()와 mouseleave() 메소드 (0) | 2021.03.17 |
댓글()