Awkward Zebra Text Effect
How do I make an awkward zebra text effect?
Horizontal striped cutout looking text.Just playing around with different css properties to create fun CSS only text effects using data-attributes and pseudo elements. What is a awkward zebra text effect? How do you make a awkward zebra text effect? This script and codes were developed by Mandy Michael on 16 December 2022, Friday.
Awkward Zebra Text Effect - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Awkward Zebra 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="XYZ"><span contenteditable data-heading="XYZ">XYZ</span></h1> <script src="js/index.js"></script>
</body>
</html>
Awkward Zebra Text Effect - Script Codes CSS Codes
html, body { background: black; background: -webkit-repeating-linear-gradient(45deg, black, black 10px, white 10px, white 20px); background: repeating-linear-gradient(45deg, black, black 10px, white 10px, white 20px); width: 100%; height: 100%;
}
h1 { font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 18vw; text-align: center; line-height: 1; margin: 0; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); position: absolute; color: white; white-space: nowrap; text-shadow: -10px 10px 0 black, 5px -5px 0 black, -5px 5px 0 black, 5px 5px 0 black;
}
h1:before, h1:after,
h1 span:before,
h1 span:after { content: attr(data-heading); position: absolute; overflow: hidden; left: 0; top: 0;
}
h1:before { color: white; height: 34%; z-index: 5;
}
h1:after { color: black; height: 50%; z-index: 4; text-shadow: -5px -5px 0 black, 5px -5px 0 black, -5px 5px 0 black, 5px 5px 0 black; -webkit-transform: translate(10px, 0); transform: translate(10px, 0);
}
h1 span:before { color: white; height: 69%; z-index: 3; text-shadow: -5px -5px 0 black, 5px -5px 0 black, -5px 5px 0 black, 5px 5px 0 black;
}
h1 span:after { color: black; height: 82%; z-index: 2; text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black; -webkit-transform: translate(-5px, 0); transform: translate(-5px, 0);
}
Awkward Zebra 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 | 3.5 |
Size | 2,961 Kb |
Views | 18,216 |
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 |
CSS Blend Mode Text Effect | 2,676 Kb |
Split fractured text | 2,857 Kb |
Split emoji text effect with css | 5,332 Kb |
Layered fonts in css | 3,238 Kb |
Stripy Rainbow Text Effect | 2,842 Kb |
Lines and layered css text effects | 3,570 Kb |
Page layout text effects with clip-path | 3,988 Kb |
Flickering Light Text Effect | 3,315 Kb |
Editable layered textured fonts | 2,909 Kb |
Think outside the div | 3,910 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 |
Pomodoro Clock | Osycon | 3,705 Kb |
Drag and Drop Quiz | Cgspicer | 3,837 Kb |
Three js | Paulq | 2,353 Kb |
The Monty Hall Problem | Melatonind | 4,360 Kb |
Haml Calendar | Katydecorah | 5,643 Kb |
Apex Calculator | Michaelwnelson | 2,370 Kb |
DFF Website | Hawcubite | 10,123 Kb |
Console fun | Dviate | 1,500 Kb |
Bootstrap 3 Price Table | Honglio | 2,655 Kb |
React Markdown Previewer | C0d0er | 3,190 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!