Stripy Rainbow Text Effect
How do I make an stripy rainbow text effect?
Horizontal striped rainbow text without lots of repeating markup! Just playing around with different css properties to create fun CSS only text effects using data-attributes and pseudo elements. What is a stripy rainbow text effect? How do you make a stripy rainbow text effect? This script and codes were developed by Mandy Michael on 16 December 2022, Friday.
Stripy Rainbow Text Effect - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Stripy Rainbow Text Effect</title> <link href="https://fonts.googleapis.com/css?family=Oswald:700" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1 data-heading="Rainbows"><span data-heading="Rainbows" contenteditable>Rainbows</span></h1> <script src="js/index.js"></script>
</body>
</html>
Stripy Rainbow Text Effect - Script Codes CSS Codes
html, body { background: -webkit-linear-gradient(45deg, #f0f9ff 0%, #cbebff 47%, #a1dbff 100%); background: linear-gradient(45deg, #f0f9ff 0%, #cbebff 47%, #a1dbff 100%); width: 100%; height: 100%;
}
h1 { font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 20vw; text-align: center; line-height: 1; margin: 0; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); position: absolute; color: #2599d8;
}
h1:before, h1:after,
h1 span:before,
h1 span:after { content: attr(data-heading); position: absolute; overflow: hidden; left: 0;
}
h1:before { color: #d61c5b; height: 34%; z-index: 5;
}
h1:after { color: #f1573f; height: 50%; z-index: 4;
}
h1 span:before { color: #feb213; height: 66%; z-index: 3;
}
h1 span:after { color: #6abc4e; height: 80%; z-index: 2;
}
Stripy Rainbow Text Effect - Script Codes JS Codes
// JS for content editable trick from Chris Coyier
var span = document.querySelector("span");
span.addEventListener("input", function() { var text = this.innerText; this.setAttribute("data-heading", text); this.parentElement.setAttribute("data-heading", text);
});
Developer | Mandy Michael |
Username | mandymichael |
Uploaded | December 16, 2022 |
Rating | 4.5 |
Size | 2,842 Kb |
Views | 30,360 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Angled Split Text Colour | 2,909 Kb |
Awkward Zebra Text Effect | 2,961 Kb |
Editable layered textured fonts | 2,909 Kb |
80s style text with clip path and layered fonts | 3,618 Kb |
Custom Underlines on Headings | 2,713 Kb |
CSS Batman Mask | 2,599 Kb |
Lines and layered css text effects | 3,570 Kb |
Think outside the div | 3,910 Kb |
Animated CSS only 3D paper fold text effect | 3,471 Kb |
Split fractured text | 2,857 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Mobile first social buttons with no iframe | Alistairtweedie | 3,158 Kb |
DFF Website | Hawcubite | 10,123 Kb |
Progressively reveal dots on a Bezier curve | GreenSock | 2,489 Kb |
Svg penguin | _massimo | 2,990 Kb |
Angular-HAML | Cwacht | 2,022 Kb |
Twitch.tv API | Ryzokuken | 2,618 Kb |
Pomodoro Clock | Yas46 | 3,328 Kb |
Pure CSS Menu | Bronsrobin | 3,321 Kb |
Two column of responsive height | Fixie | 2,908 Kb |
Modal Dialog | Gigaleet | 2,251 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!