1. 의사 요소 선택자
ABC::before – 선택기의 abc 요소 내부 앞에 내용을 삽입합니다.
ABC::after – 선택기의 abc 요소 내부 뒤에 내용을 삽입합니다.
2. 속성 선택
<!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>
</head>
<body>
<input type="text" value="EARTH" />
<input TYPE="password" value="0629"/>
<input type="text" value="ABCD" disabled/>
</body>
</html>
<!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>
<style>
(disabled) {
color: red;
}
</style>
</head>
<body>
<input type="text" value="EARTH" />
<input TYPE="password" value="0629"/>
<input type="text" value="ABCD" disabled/>
</body>
</html>
3. Gmail은 원래 div 태그를 사용하여 구축되었습니다. 유지 보수가 쉽지 않았습니다.
4번째! 최우선 순위가 중요하다
<!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>
<style>
div { color:red !important;}
</style>
</head>
<body>
<div id="color_yellow" class="color_green"
style="color: orange;">
Hello Seoul!
</div>
</body>
</html>
명령
!중요한
인라인 선언
ID 선택기
클래스 선택
태그 선택기
전체 선택기
왜 점수를 계산합니까?