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에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 4796 | jQuery | 8년 전 | 1537 | ||
| 4795 | jQuery | 8년 전 | 1440 | ||
| 4794 | jQuery | 8년 전 | 1565 | ||
| 4793 | jQuery | 8년 전 | 1621 | ||
| 4792 | jQuery | 8년 전 | 1636 | ||
| 4791 | jQuery | 8년 전 | 1795 | ||
| 4790 | jQuery | 8년 전 | 1736 | ||
| 4789 | jQuery | 8년 전 | 1600 | ||
| 4788 | jQuery | 8년 전 | 1661 | ||
| 4787 | jQuery | 8년 전 | 1476 | ||
| 4786 | jQuery | 8년 전 | 1435 | ||
| 4785 | jQuery | 8년 전 | 1646 | ||
| 4784 | jQuery | 8년 전 | 1529 | ||
| 4783 | jQuery | 8년 전 | 1234 | ||
| 4782 | jQuery | 8년 전 | 1602 | ||
| 4781 | jQuery | 8년 전 | 1341 | ||
| 4780 | jQuery | 8년 전 | 1577 | ||
| 4779 | jQuery | 8년 전 | 1986 | ||
| 4778 | jQuery | 8년 전 | 1962 | ||
| 4777 | jQuery | 8년 전 | 1532 | ||
| 4776 | jQuery | 8년 전 | 1586 | ||
| 4775 | jQuery | 8년 전 | 1973 | ||
| 4774 | jQuery | 8년 전 | 1490 | ||
| 4773 | jQuery | 8년 전 | 1415 | ||
| 4772 | jQuery | 8년 전 | 2206 | ||
| 4771 | jQuery | 8년 전 | 3619 | ||
| 4770 | PHP | 8년 전 | 5584 | ||
| 4769 | 기타 | 8년 전 | 1967 | ||
| 4768 | 기타 | 8년 전 | 1785 | ||
| 4767 | 기타 | 8년 전 | 2071 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기