A collection of 8 elegant CSS animations specifically designed to handle long text strings in confined spaces. Perfect for displaying long usernames, titles, or any text that might overflow its container.
Simply open index.html in your browser to see all animations in action with interactive code examples.
- 🎨 8 Different Animation Styles - variety of approaches to handle text overflow
- 🌙 Dark Theme - modern GitHub-inspired dark UI
- 📋 Copy-to-Clipboard - easily copy code snippets
- 🎯 Interactive Examples - see each animation in real-time
- 📱 Responsive Design - works on all screen sizes
- 🔧 Customizable - easily adjust colors, speeds, and dimensions
- Back-and-Forth Scroll - text scrolls left and right automatically with fade gradients at edges
- Hover Scroll - text only scrolls when mouse hovers over container
- Continuous Marquee - infinite loop scrolling effect
- Click to Expand - click to reveal full name with smooth expansion
- Progressive Reveal - text appears gradually from left to right
- Bounce Scroll - scrolling animation with playful bounce effect
- Static Gradients - fixed edge gradients indicating overflow
- Typewriter Effect - text types out character by character
- Clone or download this repository
- Open
index.htmlin any modern web browser - Explore the different animations and their code
Each animation is self-contained and can be copied directly from the demo page. The basic structure follows:
<div class="name-container [animation-class]">
<div class="name-wrapper">
<span class="name">Your Long Text Here</span>
</div>
</div>Replace [animation-class] with one of the following:
scroll-back-and-forthhover-scrollcontinuous-marqueeclick-to-expandprogressive-revealbounce-scrollstatic-gradientstypewriter-effect
All animations can be easily customized in styles.css:
- Background:
#0d1117(dark gray) - Container:
#161b22(darker gray) - Text:
#c9d1d9(light gray) - Borders:
#30363d(medium gray) - Accents:
#58a6ff(blue)
Adjust durations in @keyframes rules:
animation: scrollText 3s ease-in-out infinite; /* change 3s to your preference */Modify in .name-container:
max-width: 300px; /* adjust width */
padding: 12px 16px; /* adjust spacing */Works on all modern browsers that support CSS animations:
- Chrome 43+
- Firefox 16+
- Safari 9+
- Edge 12+
long-name-animations/
├── index.html # main demo page
├── styles.css # all animation styles
├── highlight.js # syntax highlighting
├── README.md # this file
└── LICENSE # license info
See LICENSE file for details.
Feel free to open issues or submit pull requests with improvements or new animation ideas!