Custom Code Experiment •
CSS-Doodle: Wiretap
Source Code View HTML / CSS / JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>CSS-Doodle · Wiretap</title>
<link href="https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
width: 100%;
height: 100%;
overflow: hidden;
background: #000000;
}
css-doodle {
display: block;
width: 100%;
height: 100%;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/css-doodle@0.39.1/css-doodle.min.js"></script>
</head>
<body>
<css-doodle>
<style>
@grid: 5x1 / 100vw 100vh / #000000;
@content: Wiretap;
@place: center;
@size: 100% 0;
color: @pn(#FFD166, #EF476F, #06FFA5, #1B98F5, #9C27B0);
z-index: @I(-@i);
font-weight: 500;
font-size: 28vw;
line-height: 0;
text-stroke: .3vw #111111;
-webkit-text-stroke: .3vw #111111;
transition: @i(*0.05s);
scale: calc(1 - .05 * @i);
rotate: calc(16deg / @uw * (@ux - @uw / 2) * @dx(-2));
translate: 0 calc(6vh / @uh * (@uy - @uh / 2) * @dx(-2));
font-family: 'Great Vibes', 'Dancing Script', 'Pacifico', cursive;
letter-spacing: 0.02em;
</style>
</css-doodle>
<script>
(function() {
let resizeTimer;
window.addEventListener('resize', function() {
if (resizeTimer) clearTimeout(resizeTimer);
resizeTimer = setTimeout(() => {
const doodle = document.querySelector('css-doodle');
if (doodle && doodle.update) doodle.update();
}, 80);
});
})();
</script>
</body>
</html>