Online HTML Editor
RUN CODE ❯
(shift+enter)
HTML Tutorials
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CSS Bouncing Scrolling Text Example</title> <style> body { font-family: Arial, sans-serif; line-height: 1.5; background-color: #FFF; font-size: 16px; color: #3a3a3a; text-align: center; } .bounce { box-shadow: 0 1px 3px rgba(0, 0, 0, .1); border: 1px solid rgba(0, 0, 0, .15); background-color: #ffffff; height: 50px; overflow: hidden; position: relative; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Adding a subtle shadow */ } .bounce p { position: absolute; width: 100%; height: 100%; margin: 0; line-height: 50px; text-align: center; transform: translateX(50%); animation: bouncing-text 10s ease-in-out infinite alternate; } @keyframes bouncing-text { 0% { transform: translateX(50%); } 100% { transform: translateX(-50%); } } </style> </head> <body> <h1>CSS Bouncing Scrolling Text Example</h1> <div class="bounce"> <p>Bouncy Marquee</p> </div> </body> </html>
/
x