CSS Animation Sample
How do I make an css animation sample?
Reference : http://www.webdesignerdepot.com/2014/05/8-simple-css3-transitions-that-will-wow-your-users/. What is a css animation sample? How do you make a css animation sample? This script and codes were developed by Tomoyuki Kashiro on 19 January 2023, Thursday.
CSS Animation Sample - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Animation Sample</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='http://cdnjs.cloudflare.com/ajax/libs/skeleton/1.2/base.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<section class="outer"> <h1 class="title">Fade</h1> <div class="target fade"> <p class="text">Fade</p> </div>
</section>
<section class="outer"> <h1 class="title">Grow</h1> <div class="target grow"> <p class="text">Grow</p> </div>
</section>
<section class="outer"> <h1 class="title">Rotate</h1> <div class="target rotate"> <p class="text">Rotate</p> </div>
</section>
<section class="outer"> <h1 class="title">Shadow</h1> <div class="target shadow"> <p class="text">Shadow</p> </div>
</section>
<section class="outer"> <h1 class="title">Swing</h1> <div class="target swing"> <p class="text">Swing</p> </div>
</section>
</body>
</html>
CSS Animation Sample - Script Codes CSS Codes
/* ------------------------------------------- common
---------------------------------------------*/
.html, body { width: 100%; height: 100%; background-color: #000;
}
.title { color: #fff; border-bottom: 1px solid #fff;
}
.outer { width: 500px; height: 300px; margin: 20px auto 0 auto;
}
.target { width: 300px; height: 200px; margin: 0 auto; background-color: #ccc; -webkit-transition: all 0.3s ease; transition: all 0.3s ease;
}
.target .text { font-size: 2rem; text-align: center; line-height: 200px;
}
/* ------------------------------------------- fade
---------------------------------------------*/
.fade { opacity: 0.5;
}
.fade:hover { opacity: 1;
}
/* ------------------------------------------- grow
---------------------------------------------*/
.grow:hover { -webkit-transform: scale(1.2); transform: scale(1.2);
}
/* ------------------------------------------- rotate
---------------------------------------------*/
.rotate:hover { -webkit-transform: rotate(30deg); transform: rotate(30deg);
}
/* ------------------------------------------- shadow
---------------------------------------------*/
.shadow:hover { box-shadow: 1px 1px red, 2px 2px blue, 3px 3px yellow; -webkit-transform: translateX(-3px); transform: translateX(-3px);
}
/* ------------------------------------------- swing
---------------------------------------------*/
.swing:hover { -webkit-animation: swing 1s ease; animation: swing 1s ease;
}
@-webkit-keyframes swing { 15% { -webkit-transform: translateX(5px); transform: translateX(5px); } 30% { -webkit-transform: translateX(-5px); transform: translateX(-5px); } 50% { -webkit-transform: translateX(3px); transform: translateX(3px); } 65% { -webkit-transform: translateX(-3px); transform: translateX(-3px); } 80% { -webkit-transform: translateX(2px); transform: translateX(2px); } 100% { -webkit-transform: translateX(0); transform: translateX(0); }
}
@keyframes swing { 15% { -webkit-transform: translateX(5px); transform: translateX(5px); } 30% { -webkit-transform: translateX(-5px); transform: translateX(-5px); } 50% { -webkit-transform: translateX(3px); transform: translateX(3px); } 65% { -webkit-transform: translateX(-3px); transform: translateX(-3px); } 80% { -webkit-transform: translateX(2px); transform: translateX(2px); } 100% { -webkit-transform: translateX(0); transform: translateX(0); }
}
Developer | Tomoyuki Kashiro |
Username | Tkashiro |
Uploaded | January 19, 2023 |
Rating | 3 |
Size | 2,896 Kb |
Views | 14,168 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Shadow Dom Test | 2,204 Kb |
Spotlight Effect | 2,723 Kb |
Responsive image srcset | 3,093 Kb |
Binary search algorithm in JavaScript | 1,798 Kb |
Bubble sort algorithm in JavaScrip | 1,713 Kb |
Simple arc animation | 4,136 Kb |
Centering Background Video | 4,087 Kb |
CSS Slideshow | 2,721 Kb |
Quick sort algorithm in JavaScrip | 1,823 Kb |
Media Fragments URI | 1,753 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Using Flickr API | MoyArt | 6,761 Kb |
Polygon Dodecahedron in CSS | Vennsoh | 7,606 Kb |
AngularJS Datalist Directive | M-e-conroy | 2,366 Kb |
Portfolio Layout Flex | Lahvjal | 3,489 Kb |
Mega Menu by Joni | Asakasinsky | 3,171 Kb |
Impress JS Algorhytmic Generator | Jeffscottward | 7,906 Kb |
Z-index demo | Kblh | 1,534 Kb |
FreeCodeCamp - Simon Game | Ivhed | 8,481 Kb |
Responsive slide | Thorien | 2,400 Kb |
700 Synapses Per Second | Silentkrange | 2,138 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!