CSS selector(CSS 선택자).03

Dana·2021년 11월 3일
0

HTML/CSS

목록 보기
6/14
post-thumbnail

부정 가상 선택

<!DOCTYPE html>
<html lang="ko">
<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>부정선택자</title>
    <style>
        /* li중에 one이 아닌 것은 red! */
        li:not(.one)
        { color: red;}
    </style>
</head>
<body>
    <ul>
        <!-- ul>li.one*5 -->
        <li class="one">hello</li>
        <li class="one">hello</li>
        <li class="two">hello</li>
        <li class="one">hello</li>
        <li class="one">hello</li>
    </ul>
</body>
</html>
profile
웹개발

0개의 댓글