Tina

생활코딩 Javascript 수업 - CSS Selector

밍밍이

밍밍이

Sep 16, 2019

CSS Selector

CSS를 선택하는 우선순위는 태그 -> 클래스 -> 아이디이다.

<head>
<style>
span{
color:blue;
}
.target_class{
color:red;
}
#target_id{
color:powderblue;
}
</style>
</head>
<body>
<p>This text is in Black.You can also add your own text by typing over the <span>top</span> of this <span class="target_class">text</span>.This text is in Black.You can also add your own text by typing over the <span>top</span> of this <span class="target_class">text</span>.This text is in Black.You can also add your <span id="target_id">own text</span> by typing over the <span>top</span> of this <span class="target_class">text</span>.</p>
</body>