When you specify CSS styles inside the @keyframes rule, the animation will gradually change from the current style to the new style at certain times.
CSS Tutorial
CSS Tutorial
CSS Advanced
CSS Responsive Layouts
Advertisement
Google AdSense Slot (LEADERBOARD)
Automated High-CTR Ad Rail • Set Publisher ID in config/adsense.php
Keyframes
7 min read
•
Chapter 19 of 23
CSS Animations & @keyframes
An animation lets an element gradually change from one style to another. You can change as many CSS properties you want, as many times you want.
Example
<!DOCTYPE html>
<html>
<head>
<style>
@keyframes pulse { 0% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0.6; transform: scale(1); } }
.indicator { width: 12px; height: 12px; background: #10b981; border-radius: 999px; animation: pulse 1.5s infinite; }
</style>
</head>
<body style="font-family:sans-serif;padding:20px;display:flex;align-items:center;gap:8px;">
<div class="indicator"></div>
<strong>NSE Live Feed Active</strong>
</body>
</html>
Try it Yourself >>
Opens live sandboxed code editor
Advertisement
Google AdSense Slot (IN-ARTICLE)
Automated High-CTR Ad Rail • Set Publisher ID in config/adsense.php
Community Q&A & Discussion
Verified
No questions yet. Be the first to start the discussion!