Skip to content

Instantly share code, notes, and snippets.

@iamanas20
Created December 1, 2018 00:06
Show Gist options
  • Save iamanas20/c1781dcb22f78c21cc8d4c0270d93266 to your computer and use it in GitHub Desktop.
Save iamanas20/c1781dcb22f78c21cc8d4c0270d93266 to your computer and use it in GitHub Desktop.
quick animation of a dropdown profile menu!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"> -->
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<!-- <script src="main.js"></script> -->
</head>
<body>
<div class="big-fucking-div">
</div>
</body>
</html>
body{
padding: 0;
margin: 0;
background-color: #555555;
}
.big-fucking-div{
height: 120px;
width: 60px;
background-color:rgba(253, 0, 0, 1);;
align-content: center;
border-radius: 7px;
margin: auto;
margin-top: 30px;
animation: dropdown-animation;
animation-duration: 300ms;
}
@keyframes dropdown-animation{
0%{ height: 117px; margin-top: 15px; background-color: rgba(253, 0, 0, 0.05);}
100%{height: 120px; margin-top: 30px; background-color: rgba(253, 0, 0, 1);}
/* 100%{height: 120px; margin-top: 30px; background-color: rgba(253, 0, 0, 1);} */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment