반응형
<!DOCTYPE html>
<html lang="kr">
<head>
<title>The Nick Times</title>
<style>
body {
height: 1000vh;
margin: 50px;
}
button:active {
background-color: tomato;
}
</style>
</head>
<body>
<div>
<button>Hello</button>
</div>
</body>
</html>
결과
버튼을 클릭하면 버튼이 빨간색으로 변한다.
반응형
'2. CSS' 카테고리의 다른 글
CSS focus를 이용해서 input 박스 강조하기 (0) | 2024.11.30 |
---|---|
CSS Hover 마우스 오버 시 버튼 색상 변경하기 (0) | 2024.11.30 |
CSS 특정 단어가 포함된 placeholder 꾸미기 (0) | 2024.11.29 |
CSS Pseudo Selectors / input[type="password"] {background-color: thistle;} (0) | 2024.11.29 |
CSS required placeholder 에 테두리 색 넣기 (0) | 2024.11.29 |