<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<span>button</span>
<span>button</span>
</body>
<style>
*{
margin: 0;
padding: 0;
}
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 80vh;
background: #7373ac;
}
span{
position: relative;
padding: 20px 30px;
margin: 10px;
background: #ffffff;
color: #fff;
text-decoration: none;
border: 1px solid #000;
transition: 0.5s;
}
span:hover{
background: #378d54;
}
span:nth-child(2):hover{
background: #070000;
}
</style>
</html>
'Web > HTML | CSS|JAVASCRIPT' 카테고리의 다른 글
Shadow 정리(CSS) (0) | 2020.07.27 |
---|---|
border-radius 정리(CSS) (0) | 2020.07.27 |
자바스크립트를 사용하지 않은 슬라이드 이미지 만들기(HTML, CSS) (0) | 2020.07.21 |
transfrom, keyframes 도형 회전하기(HTML, CSS) (0) | 2020.07.18 |
hover, transition를 이용한 버튼 (HTML, CSS) (0) | 2020.07.18 |