<html>
<head>
<meta charset="utf-8">
<style>
a[href] {
background: blue;
color: white;
}
</style>
</head>
<body>
<ul>
<li><a href="#"></a>메뉴 1</li>
<li><a href="#"></a>메뉴 2</li>
<li><a href="#"></a>메뉴 3</li>
</ul>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<style>
a[target="_blank"] {
padding-left: 10px;
background-color: yellow;
}
</style>
</head>
<body>
<ul>
<li><a href="#" target="_blank"></a>메뉴 1</li>
<li><a href="#"></a>메뉴 2</li>
<li><a href="#"></a>메뉴 3</li>
</ul>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<style>
[class ~="test"] {
font-size: 10px;
background-color: yellow;
border: 1px solid #000;
}
</style>
</head>
<body>
<ul>
<li><a href="#" class="test" target="_blank"></a>메뉴 1</li>
<li><a href="#"></a>메뉴 2</li>
<li><a href="#"></a>메뉴 3</li>
<li><a href="#" class="test"></a>메뉴 4</li>
<li><a href="#"></a>메뉴 5</li>
</ul>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<style>
[class |="test1"] {
font-size: 10px;
background-color: yellow;
border: 1px solid #000;
}
</style>
</head>
<body>
<ul>
<li><a href="#" class="test" target="_blank"></a>메뉴 1</li>
<li><a href="#" class="test1"></a>메뉴 2</li>
<li><a href="#" class="test1"></a>메뉴 3</li>
<li><a href="#" class="test"></a>메뉴 4</li>
<li><a href="#"></a>메뉴 5</li>
</ul>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<style>
[class ^="te"] {
font-size: 10px;
background-color: yellow;
border: 1px solid #000;
}
</style>
</head>
<body>
<ul>
<li><a href="#" class="test" target="_blank"></a>메뉴 1</li>
<li><a href="#" class="test1"></a>메뉴 2</li>
<li><a href="#" class="test1"></a>메뉴 3</li>
<li><a href="#" class="test"></a>메뉴 4</li>
<li><a href="#"></a>메뉴 5</li>
</ul>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<style>
[class $="st1"] {
font-size: 10px;
background-color: yellow;
border: 1px solid #000;
}
</style>
</head>
<body>
<ul>
<li><a href="#" class="test" target="_blank"></a>메뉴 1</li>
<li><a href="#" class="test1"></a>메뉴 2</li>
<li><a href="#" class="test1"></a>메뉴 3</li>
<li><a href="#" class="test"></a>메뉴 4</li>
<li><a href="#"></a>메뉴 5</li>
</ul>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<style>
[class *="es"] {
font-size: 10px;
background-color: yellow;
border: 1px solid #000;
}
</style>
</head>
<body>
<ul>
<li><a href="#" class="test" target="_blank"></a>메뉴 1</li>
<li><a href="#" class="test1"></a>메뉴 2</li>
<li><a href="#" class="ttt1"></a>메뉴 3</li>
<li><a href="#" class="test"></a>메뉴 4</li>
<li><a href="#"></a>메뉴 5</li>
</ul>
</body>
</html>
[CSS] 변형 (0) | 2021.05.16 |
---|---|
[CSS] 가상 클래스와 가상 요소 (0) | 2021.05.13 |
[CSS 기초] 연결 선택자 (0) | 2021.05.11 |
[HTML5] 시맨틱 태그 (0) | 2021.05.10 |
[CSS 기초] 표 스타일 (2) (0) | 2021.05.07 |
댓글 영역