2020/CSS
css states(hover, active, focus, visited)
꽃꽂이하는개발자
2020. 2. 16. 18:21
반응형
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CSS States</title>
<style>
.box{
background-color: red;
font-size: 40px;
}
.box:hover{
background-color: pink;
}
.box:active{
background-color: green;
}
input:focus{
background-color:blue;
}
a:visited{
color: yellow;
}
</style>
</head>
<body>
<input type="text">
<span class="box">lalalalalala</span>
<a href="http://kakao.com">Naver</a>
</body>
</html>
hover : 마우스를 올렸을때
active : 클릭했을때
출처: nomad coder
반응형