Skip to content
  • Home
  • About
  • No Access
  • Privacy Policy
Bits of .NET
Bits of .NET
  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy
CSS

CSS: Creating Animated Backgrounds with CSS

- 16.08.26 - ErcanOPAK

✨ Animated Backgrounds = Engaging UI

Static backgrounds are boring. CSS animated backgrounds create engaging, dynamic interfaces.

📝 Animated Backgrounds

// Gradient Animation
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    animation: gradient 10s ease infinite;
}

// Particle Background
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    animation: float 5s ease-in-out infinite;
}

// Wave Animation
@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.wave {
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        rgba(255,255,255,0.1) 50px,
        transparent 100px
    );
    width: 200%;
    animation: wave 20s linear infinite;
}

🎯 Advanced Background Effects

// Ripple Effect
@keyframes ripple {
    from {
        transform: scale(0);
        opacity: 1;
    }
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    animation: ripple 2s ease-out;
}

// Shimmer Effect
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent 25%,
        rgba(255,255,255,0.2) 50%,
        transparent 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

// Holographic Background
.holographic {
    background: linear-gradient(120deg, 
        #a8edea 0%, 
        #fed6e3 50%, 
        #a8edea 100%);
    background-size: 300% 300%;
    animation: holographic 6s ease infinite;
}

@keyframes holographic {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

// Matrix Rain
.matrix-bg {
    font-family: 'Courier New', monospace;
    background: #000;
    overflow: hidden;
}

💡 Background Animation Tips

  • Keep animations subtle
  • Use will-change for performance
  • Test on different browsers
  • Consider reduced motion preferences
  • Use appropriate durations

Animated backgrounds create immersive experiences. They make websites feel alive and engaging.

— Frontend Developer

Related posts:

CSS: Use :focus-visible for Better Focus Indicators

CSS: Use :focus-visible for Better Focus Indicators

CSS: Understand Display Property — Block, Inline, Flex, Grid

CSS: Understand Display Property — Block, Inline, Flex, Grid

CSS: Fix Container Queries Never Triggering Because the Parent Element Was Never Given an Explicit c...

CSS: Fix Container Queries Never Triggering Because the Parent Element Was Never Given an Explicit c...

Views: 17

Post navigation

Windows 11: Gaming Performance Optimization
HTML: Using ARIA Roles for Better Accessibility

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

November 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« Oct    

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,055)
  • Get the User Name and Domain Name from an Email Address in SQL (980)
  • How to add default value for Entity Framework migrations for DateTime and Bool (977)
  • Get the First and Last Word from a String or Sentence in SQL (858)
  • How to select distinct rows in a datatable in C# (854)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (653)
  • Add Constraint to SQL Table to ensure email contains @ (609)
  • Average of all values in a column that are not zero in SQL (570)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (547)
  • Find numbers with more than two decimal places in SQL (475)

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit
  • SQL Server: Fix ROW_NUMBER Ties Reordering Between Identical Runs
  • C#: Fix an Enum HasFlag Returning True for the Zero Value
  • WordPress: Fix Featured Images Vanishing After a CDN Migration
  • Photoshop: Fix Content-Aware Fill Smearing a Repeating Pattern
  • Asp.Net Core: Fix Antiforgery Tokens Rejected Behind a Reverse Proxy

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,055)
  • Get the User Name and Domain Name from an Email Address in SQL (980)
  • How to add default value for Entity Framework migrations for DateTime and Bool (977)
  • Get the First and Last Word from a String or Sentence in SQL (858)
  • How to select distinct rows in a datatable in C# (854)

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com