Knockout Text Effects - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Knockout Text Effects</title> <style> @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@800&display=swap'); @import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css'); body { background: linear-gradient(to right, #1e3c72, #2a5298); display: flex; align-items: center; justify-content: center; height: 100vh; margin: 0; font-family: 'Montserrat', sans-serif; color: #fff; } .container { text-align: center; position: relative; } .knockout-text { font-size: 4em; font-weight: 800; position: relative; display: inline-block; background: linear-gradient(to right, #f64f59, #c471ed, #12c2e9); -webkit-background-clip: text; color: transparent; margin: 0; } .knockout-text::before { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #000; -webkit-background-clip: text; background-clip: text; color: transparent; animation: glow 2s infinite; pointer-events: none; } .knockout-text .emoji, .knockout-text .icon { display: inline-block; } .knockout-text .emoji { animation: bounce 1s infinite alternate; } .knockout-text .icon { animation: spin 4s infinite linear; } @keyframes glow { 0%, 100% { text-shadow: 0 0 10px #fff, 0 0 20px #ff00ff, 0 0 30px #ff00ff, 0 0 40px #ff00ff, 0 0 50px #ff00ff, 0 0 60px #ff00ff, 0 0 70px #ff00ff; } 50% { text-shadow: 0 0 20px #fff, 0 0 30px #ff00ff, 0 0 40px #ff00ff, 0 0 50px #ff00ff, 0 0 60px #ff00ff, 0 0 70px #ff00ff, 0 0 80px #ff00ff; } } @keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-10px); } } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } </style> </head> <body> <div class="container"> <h1 class="knockout-text" data-text="Welcome!"> Welcome! </h1> </div> </body> </html>