반응형
<!DOCTYPE html>
<html lang="kr">
<head>
<title>The Nick Times</title>
<style>
body {
height: 1000vh;
margin: 50px;
}
input {
border: 1px solid wheat;
}
input:required {
border-color: tomato;
}
input[placeholder="username"] {
background-color: greenyellow;
}
input[type="password"] {
background-color: thistle;
}
</style>
</head>
<body>
<div>
<form>
<input type="text" placeholder="username" />
<input type="password" required placeholder="password" />
</form>
</div>
</body>
</html>
결과
반응형
'2. CSS' 카테고리의 다른 글
CSS active 버튼 클릭 시 색깔 바뀌기 (0) | 2024.11.30 |
---|---|
CSS 특정 단어가 포함된 placeholder 꾸미기 (0) | 2024.11.29 |
CSS required placeholder 에 테두리 색 넣기 (0) | 2024.11.29 |
CSS Pseudo-classes 종류 (0) | 2024.11.29 |
CSS 바로 뒤에 오지 않는 형제 지목하기 A ~ B { } (0) | 2024.11.29 |