← Todos os snippets
Fundo em gradiente animado
Degradê que se move lentamente, ótimo para heros.
Preview ao vivo
Código completo
<style>*{box-sizing:border-box}body{font-family:system-ui,sans-serif;margin:0;padding:24px;background:#0e1013;color:#e8eaec;line-height:1.5}a{color:inherit;text-decoration:none}img{max-width:100%;display:block}
.g{height:200px;border-radius:20px;display:grid;place-items:center;color:#fff;font:800 26px system-ui;background:linear-gradient(120deg,#2f6fed,#7c3aed,#e4572e,#1f9c7a);background-size:300% 300%;animation:m 8s ease infinite}@keyframes m{50%{background-position:100% 50%}}@media(prefers-reduced-motion:reduce){.g{animation:none}}
</style>
<div class="g">Gradiente vivo</div>