κ°μμμ(Pseudo Element) μ νμμ μΆκ°νλ ν€μλ μ νν μμμ μ§μ λ λΆλΆμ μ€νμΌ μ μ©
μ νμ::before
.required-sign::before {
content: '*';
color: #f00;
}
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>11_pseudoElement</title>
<link rel="stylesheet" href="./11.css">
</head>
<body>
<form action="">
<label for="account" class="required-sign">ID : </label>
<input type="text" name="account" id="account">
<br>
<label for="password" class="required-sign">PW : </label>
<input type="password" name="password" id="password">
<br>
<label for="name">NAME : </label>
<input type="name" name="name" id="name">
<br>
</form>
</body>
</html>

μ νμ::after
.required-sign::after{
content: '*';
color: #f00;
}
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>11_pseudoElement</title>
<link rel="stylesheet" href="./11.css">
</head>
<body>
<form action="">
<label for="account" class="required-sign">ID : </label>
<input type="text" name="account" id="account">
<br>
<label for="password" class="required-sign">PW : </label>
<input type="password" name="password" id="password">
<br>
<label for="name">NAME : </label>
<input type="name" name="name" id="name">
<br>
</form>
</body>
</html>
