jQuery ( ": header")
jQuery ( ": header")
설명 : h1, h2, h3 등과 같이 헤더 인 모든 요소를 선택합니다.
추가 참고 사항 :
:headerjQuery 확장이며 CSS 사양의 일부가 아니기 때문에 사용하는 쿼리 :header는 기본 DOM querySelectorAll()메서드 에서 제공하는 성능 향상을 이용할 수 없습니다 . :header요소를 선택 하는 데 사용할 때 최상의 성능을 얻으려면 먼저 순수한 CSS 선택 도구를 사용하여 요소를 선택한 다음를 사용하십시오 .filter(":header").
예:
페이지의 모든 헤더에 배경 및 텍스트 색상을 추가합니다.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>header demo</title>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<h1>Header 1</h1>
<p>Contents 1</p>
<h2>Header 2</h2>
<p>Contents 2</p>
<script>
$( ":header" ).css({ background: "#ccc", color: "blue" });
</script>
</body>
</html>
게시판 목록
개발자팁
개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 4706 | jQuery | 8년 전 | 1517 | ||
| 4705 | jQuery | 8년 전 | 2178 | ||
| 4704 | jQuery | 8년 전 | 1712 | ||
| 4703 | jQuery | 8년 전 | 2048 | ||
| 4702 | jQuery | 8년 전 | 1837 | ||
| 4701 | jQuery | 8년 전 | 2071 | ||
| 4700 | jQuery | 8년 전 | 1750 | ||
| 4699 | jQuery | 8년 전 | 1532 | ||
| 4698 | jQuery | 8년 전 | 1340 | ||
| 4697 | jQuery | 8년 전 | 1755 | ||
| 4696 | jQuery | 8년 전 | 2375 | ||
| 4695 | jQuery | 8년 전 | 1391 | ||
| 4694 | jQuery | 8년 전 | 1804 | ||
| 4693 | jQuery | 8년 전 | 1779 | ||
| 4692 | jQuery | 8년 전 | 2572 | ||
| 4691 | jQuery | 8년 전 | 2080 | ||
| 4690 | jQuery | 8년 전 | 1970 | ||
| 4689 | jQuery | 8년 전 | 1950 | ||
| 4688 | jQuery | 8년 전 | 1707 | ||
| 4687 | jQuery | 8년 전 | 1120 | ||
| 4686 | jQuery | 8년 전 | 1753 | ||
| 4685 | jQuery | 8년 전 | 2497 | ||
| 4684 | jQuery | 8년 전 | 2377 | ||
| 4683 | jQuery | 8년 전 | 1772 | ||
| 4682 | PHP | 8년 전 | 3094 | ||
| 4681 | jQuery | 8년 전 | 1611 | ||
| 4680 | jQuery | 8년 전 | 1799 | ||
| 4679 | PHP | 8년 전 | 2026 | ||
| 4678 | PHP | 8년 전 | 2157 | ||
| 4677 | PHP | 8년 전 | 2260 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기