728x90 반응형 prop()1 jQuery 선택자 //태그 선택자 // jQuery 선택자는 css선택자와 같다!$("h5").css("color", "red");$("p").css("color", "blue");// 자바스크립트로 했을 때 //document.getElementsByTagName("p").style.color = "green";// -> 배열에 스타일을 적용할 수 없다!const arr = document.getElementsByTagName("p");for(let item of arr){ item.style.color = "green";}//h5, p 두 태그 동시에 배경색을 yellow으로 지정하기$("h5,p").css("backgroundColor", "yellow");// 클래스 선택자// 클래스 item인 요소의 글자색.. 2024. 6. 22. 이전 1 다음 728x90 반응형