Toggle navigation
☰
HTML
CSS
Scripting
Database
<!doctype html> <title>Example</title> <style> body { font-family: sans-serif; background-color: #f8f9fa; padding: 20px; } .skeleton-card { background-color: white; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); padding: 20px; max-width: 300px; margin: 0 auto; } /* The base style for our shimmering skeleton elements */ .skeleton { background-color: #eee; /* Create an angled gradient for the "shine" */ background-image: linear-gradient( 90deg, #eeeeee 0px, #f8f8f8 40px, #eeeeee 80px ); /* Make the background much wider than the element so we can slide it */ background-size: 300px 100%; animation: shimmer 1.5s infinite linear; border-radius: 4px; } .skeleton-avatar { width: 60px; height: 60px; border-radius: 50%; margin-bottom: 15px; } .skeleton-title { width: 60%; height: 20px; margin-bottom: 15px; } .skeleton-text { width: 100%; height: 12px; margin-bottom: 8px; } .skeleton-text.short { width: 80%; } @keyframes shimmer { 0% { background-position: -300px 0; } 100% { background-position: 300px 0; } } </style> <div class="skeleton-card"> <div class="skeleton skeleton-avatar"></div> <div class="skeleton skeleton-title"></div> <div class="skeleton skeleton-text"></div> <div class="skeleton skeleton-text"></div> <div class="skeleton skeleton-text short"></div> </div>