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에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 4826 | jQuery | 8년 전 | 1672 | ||
| 4825 | JavaScript | 8년 전 | 2740 | ||
| 4824 | jQuery | 8년 전 | 1464 | ||
| 4823 | jQuery | 8년 전 | 1727 | ||
| 4822 | jQuery | 8년 전 | 1812 | ||
| 4821 | jQuery | 8년 전 | 1641 | ||
| 4820 | jQuery | 8년 전 | 1648 | ||
| 4819 | jQuery | 8년 전 | 1329 | ||
| 4818 | jQuery | 8년 전 | 1969 | ||
| 4817 | jQuery | 8년 전 | 2409 | ||
| 4816 | jQuery | 8년 전 | 1706 | ||
| 4815 | jQuery | 8년 전 | 1422 | ||
| 4814 | jQuery | 8년 전 | 1839 | ||
| 4813 | jQuery | 8년 전 | 5412 | ||
| 4812 | 기타 | 8년 전 | 3164 | ||
| 4811 | jQuery | 8년 전 | 1545 | ||
| 4810 | jQuery | 8년 전 | 1717 | ||
| 4809 | jQuery | 8년 전 | 1806 | ||
| 4808 | PHP |
|
8년 전 | 5085 | |
| 4807 | node.js |
|
8년 전 | 4120 | |
| 4806 | jQuery | 8년 전 | 2219 | ||
| 4805 | jQuery | 8년 전 | 1653 | ||
| 4804 | jQuery | 8년 전 | 1201 | ||
| 4803 | jQuery | 8년 전 | 1913 | ||
| 4802 | jQuery | 8년 전 | 1418 | ||
| 4801 | jQuery | 8년 전 | 1522 | ||
| 4800 | jQuery | 8년 전 | 1742 | ||
| 4799 | jQuery | 8년 전 | 1985 | ||
| 4798 | jQuery | 8년 전 | 1521 | ||
| 4797 | jQuery | 8년 전 | 1456 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기