CSS
[class] {
color: red;
}
HTML
<ui class="fruits">
<span class="sale-orange">오렌지</span> ---->선택됨
<p class="red">딸기</p> ---->선택됨
<li class="yellow">망고</li> ---->선택됨
<li class="sale-red">사과</li> ---->선택됨
</ui>
CSS
[class="red"] {
color: red;
}
HTML
<ui class="fruits">
<span class="sale-orange">오렌지</span>
<p class="red">딸기</p> ---->선택됨
<li class="yellow">망고</li>
<li class="sale-red">사과</li>
</ui>
CSS
[class^="sale"] {
color: red;
}
HTML
<ui class="fruits">
<span class="sale-orange">오렌지</span> ---->선택됨
<p class="red">딸기</p>
<li class="yellow">망고</li>
<li class="sale-red">사과</li> ---->선택됨
</ui>
CSS
[class$="orange"] {
color: red;
}
HTML
<ui class="fruits">
<span class="sale-orange">오렌지</span> ---->선택됨
<p class="red">딸기</p>
<li class="yellow">망고</li>
<li class="sale-red">사과</li>
</ui>