4 ms·
Idk. Animate it? (function() { const colors = ['red', 'green', 'blue']; const setColor = (el, idx) => { let currentThickness = (idx % 10) + 1; el.s
by kacesensitive 3y ago
Idk. Animate it?
(function() {
const colors = ['red', 'green', 'blue'];
const setColor = (el, idx) => {
let currentThickness = (idx % 10) + 1;
el.style.outlineColor = colors[idx % colors.length];
let direction = 1;
setInterval(() => {
if (currentThickness >= 10 || currentThickness <= 1) direction *= -1;
el.style.outline = `${currentThickness}px solid ${colors[idx % colors.length]}`;
currentThickness += direction;
}, 100);
[...el.children].forEach(child => setColor(child, idx + 1));
};
setColor(document.body, 0);
})();
- Jerrrry 3y agomake it do a barrel roll
- flir 3y agojavascript:(function() { const applyRotation = (el, t) => { el.style.cssText = `transition:transform ${t}s; transform-style:preserve-3d; perspective:2048px; transform:rotateY(360deg)`; [...el.children].forEach(child => applyRotation(child, t + 0.4)); }; applyRotation(document.body, 1); })();
- Jerrrry 3y agofuck that was sick