WEBLEB
Inicio
Editora de código
Iniciar sesión
Pro
Español
English
Français
Español
Português
Deutsch
Italiano
हिंदी
baúl del avión
291
ByBy.inc
Abrir en el editor
Publica tu código
¿Necesitas un sitio web?
Recomendado
27 December 2024
Matriz
26 January 2025
Un código de Redllowge
17 March 2023
Formulario de suscripción a boletín informativo
HTML
Copy
abrir tampa
CSS
Copy
* { margin: 0; padding: 0; } body{ background: rgb(0, 0, 0); width: 100vw; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; font-family: monospace; } /*elipse 1 da tampa e container com cor de fundo igual ao background */ .container::before,.tampa::before{ content: ''; background: rgb(0, 0, 0); width: 250px; position: absolute; left: -160px; top: -32px; height: 130px; clip-path: ellipse(25% 40% at 50% 50%); } /*elipse 2 da tampa e container com cor de fundo igual ao background*/ .container::after,.tampa::after{ content: ''; position: absolute; left: 160px; top: -32px; background: rgb(0, 0, 0); width: 250px; height: 130px; clip-path: ellipse(25% 40% at 50% 50%); } /* container e tampa (retangulos)*/ .container,.tampa{ position: absolute; background: rgba(255, 255, 255); width: 250px; height: 65px; display: flex; flex-direction: column; align-items: center; justify-content: center; } /* tampa na frente com z-index */ .tampa{ z-index: 2; } /* animacao ao passar mouse na tampa */ .tampa:hover{ animation: abrirTampa 1.5s linear forwards; transform-origin: top; } /* animacao rotate para abrir */ @keyframes abrirTampa{ 0%{ transform: rotateX(0); } 100%{ transform: rotateX(-135deg); } }
JS
Copy
/* Replace with your JS Code (Leave empty if not needed) */