WEBLEB
Início
Editor
Entrar
Pro
Português
English
Français
Español
Português
Deutsch
Italiano
हिंदी
Fluxo de dados de animação de coração em HTML
66
ByBy.inc
Abrir no Editor
Publique Seu Código
Recomendado
23 August 2025
Blog de Engenharia: IA, Nuvem, Segurança Cibernética e Mais
4 May 2025
Modelo de barra de navegação HTML e CSS responsivo
23 June 2025
Exemplo de formulário de login em HTML
HTML
Copy
CSS
Copy
* { margin: 0; padding: 0; box-sizing: border-box; } body { background-color: #14171d; display: flex; align-items: center; justify-content: center; height: 100vh; overflow: hidden; } .codigo { position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: #272822; color: #F8F8F2; font-family: 'Consolas', 'Monaco', monospace; font-size: 18px; padding: 20px; border-radius: 8px; white-space: pre-line; text-align: left; line-height: 1.6; max-height: 50%; max-width: 90%; width: 100%; overflow-y: auto; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); } .selector { color: #F92672; } .property { color: #66D9EF; } .value-number { color: #AE81FF; } .value-string { color: #E6DB74; } .value-color { color: #A6E22E; } .brace { color: #F8F8F2; } .comment { color: #75715E; } .function { color: #A6E22E; } .animation-container { position: absolute; top: 75%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; width: 100%; height: 50%; overflow: hidden; background: transparent; } /* Tuesday's Algorithm of Affection - CSS */ .heart { position: relative; width: 200px; height: 200px; margin: 0 auto; transform: rotate(45deg); animation: heartBeat 2s infinite alternate; } /* Formato de um coração - Repre senta a lógica do algoritmo ** */ .heart::before, .heart::after { content: ""; position: absolute; background: radial-gradient( circle at top left, #E6DB74 0%, #AE81FF 50%, #66D9EF 100% ); /* Variabilidade de cores */ border-radius: 50%; } .heart::before { top: 0; left: 0; width: 100%; height: 100%; } .heart::after { top: 0; right: 0; width: 100%; height: 100%; /* Animação de pulsação - Manifestação de impulsos digitais */ animation: pulse 1s ease-in-out infinite; } @keyframes heartBeat { 0% { transform: rotate(45deg); scale: 1; } 100% { transform: rotate(45deg) scale(0.9); } } @keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } } /* Construção de um fluxo de dados, representando a conexão ** */ .data-stream { position: absolute; bottom: 0; left: 0; width: 100%; height: 10px; background: linear-gradient( to right, #66D9EF 0%, #AE81FF 50%, #E6DB74 100% ); transform-origin: 50% 100%; animation: dataFlow 3s linear infinite; } @keyframes dataFlow { 0% { transform: rotate(0deg); animation-timing-function: ease-in-out; } 50% { transform: rotate(180deg); opacity: 0.5; } 100% { transform: rotate(360deg); animation-timing-function: ease-in-out; } }
JS
Copy
const canvas = document.getElementById('matrixCanvas'); const ctx = canvas.getContext('2d'); function resizeCanvas() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; } resizeCanvas(); window.addEventListener('resize', resizeCanvas); const matrixChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789@#$%^&*()'; const fontSize = 16; const columns = canvas.width / fontSize; const drops = Array.from({ length: columns }).fill(1); function draw() { ctx.fillStyle = 'rgba(0, 0, 0, 0.05)'; ctx.fillRect(0, 0, canvas.width, canvas.height); ctx.fillStyle = '#0f0'; ctx.font = `${fontSize}px monospace`; drops.forEach((y, i) => { const text = matrixChars[Math.floor(Math.random() * matrixChars.length)]; const x = i * fontSize; ctx.fillText(text, x, y * fontSize); if (y * fontSize > canvas.height && Math.random() > 0.975) { drops[i] = 0; } drops[i]++; }); } setInterval(draw, 50);