Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
DMD-3470/Demo.html
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
59 lines (53 sloc)
1.87 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Animations in CSS</title> | |
</head> | |
<body> | |
<style> | |
.scale-up-top { | |
animation: scale-up-top 0.5s cubic-bezier(0.390, 0.575, 0.565, 1.000) both; | |
} | |
@keyframes scale-up-top { | |
0% { | |
transform: scale(0.5); | |
transform-origin: 50% 0%; | |
} | |
100% { | |
transform: scale(1); | |
transform-origin: 50% 0%; | |
} | |
} | |
main { | |
display: flex; | |
flex-wrap: wrap; | |
gap:10px; | |
} | |
main > div { | |
width:100px; | |
height: 100px; | |
background-color:cornflowerblue | |
} | |
footer:hover { | |
animation: scale-up-top 0.5s cubic-bezier(0.390, 0.575, 0.565, 1.000) both | |
} | |
</style> | |
<h1>Animation Demo</h1> | |
<main> | |
<div class="scale-up-top"> </div> | |
<div class="scale-up-top" style="animation-delay: .2s;"> </div> | |
<div class="scale-up-top" style="animation-delay: .4s;"> </div> | |
<div class="scale-up-top" style="animation-delay: .6s;"> </div> | |
<div class="scale-up-top" style="animation-delay: .8s;"> </div> | |
<div class="scale-up-top" style="animation-delay: 1s;"> </div> | |
<div class="scale-up-top" style="animation-delay: 1.2s;"> </div> | |
<div class="scale-up-top" style="animation-delay: 1.4s;"> </div> | |
</main> | |
<footer> | |
<h2>Hover Me</h2> | |
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Obcaecati ratione pariatur, molestiae ullam deleniti odit error nobis quam maiores est harum eligendi ducimus illum distinctio. Alias, assumenda at. Iusto, eos!</footer> | |
</body> | |
</html> |