<!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>
<style>
body{
background-color: white;
}
.container{
position: absolute;
top: 30%;
left: 50%;
transform: translate(-50%, -50%);
}
.menu{
width: 149px;
height: 149px;
background-color: #ee81b7;
box-shadow: 0 0 35px rgb(6, 253, 59);
cursor: pointer;
position: relative;
border-radius: 12px;
}
div{
position: absolute;
height: 11px;
background-color: white;
transition: width 0.5s ease;
border-radius: 4px;
}
.one{
width: 70px;
top: 40px;
left: 20px;
}
.two{
width: 40px;
top: 70px;
left: 20px;
}
.three{
width: 50px;
top: 100px;
left: 20px;
}
.menu:hover div{
width:60px;
transition: width 0.5s ease;
}
</style>
<body>
<div class="container">
<div class="menu">
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
</div>
</div>
</body>
</html>
'Web > HTML | CSS|JAVASCRIPT' 카테고리의 다른 글
자바스크립트를 사용하지 않은 슬라이드 이미지 만들기(HTML, CSS) (0) | 2020.07.21 |
---|---|
transfrom, keyframes 도형 회전하기(HTML, CSS) (0) | 2020.07.18 |
hover, transition를 이용한 버튼 (HTML, CSS) (0) | 2020.07.18 |
hover, keyframes를 이용한 버튼(HTML, CSS) (0) | 2020.07.15 |
hover를 이용한 메뉴바 menubar (HTML, CSS) (0) | 2020.07.15 |