Enterprise Verified
Academy Frontend Web Development CSS CSS Animations & @keyframes
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.

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.

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

No questions yet. Be the first to start the discussion!
Enterprise Operations Suite

Streamline Employee Payroll & Attendance Operations

Eliminate manual spreadsheet errors. Integrate automated attendance tracking, EPF/ESI statutory calculations, and custom GST invoices.

Copied!

AI Learning Assistant

Ready to explain & guide

Hello! I am your MBS Digital AI Tutor. Ask me to explain concepts, review code, or suggest debugging steps.

Quick Starters:
AI Tutor is thinking...