Si Google, 'hacer un barril de rodillos', toda la página hace una rotación de 360 grados. ¿Alguien tiene alguna idea de cómo Google está haciendo esto? Inhabilité javascript, y todavía ocurrió, ¿entonces tal vez una rotación css?¿Cómo hace google el barril?
Respuesta
Si nos fijamos en el código CSS:
body {
-moz-animation-duration: 4s;
-moz-animation-iteration-count: 1;
-moz-animation-name: roll;
}
donde roll es algo así como @ -webkit-keyframes roll { \t desde {-webkit-transform: rotate (0); } \t a {-webkit-transform: rotate (360deg); } } – wave
¡Las animaciones de JavaScript molestas están muertas! Todos saludan odiosas animaciones CSS! –
Es una transición CSS: https://developer.mozilla.org/en/CSS/CSS_transitions
-moz-transform: rotate(360deg);
-moz-transition-property: all;
-moz-transition-duration: 5s;
Ejemplo para Mozilla anterior, utilice -o
y -webkit
a dirigirse a otros navegadores.
suena como una rotación CSS3 transformation aplicado a las etiquetas ya sea del cuerpo o html
Se utiliza animaciones CSS personalizados. Ver las reglas CSS aplicados a la <body>
aquí:
body {
-moz-animation-name: roll;
-moz-animation-duration: 4s;
-moz-animation-iteration-count: 1;
-o-animation-name: roll;
-o-animation-duration: 4s;
-o-animation-iteration-count: 1;
-webkit-animation-name: roll;
-webkit-animation-duration: 4s;
-webkit-animation-iteration-count: 1;
}
Como se ha dicho anteriormente, con animaciones CSS3 y transformar.
Wesbo mostró una forma de aplicar el efecto en cualquier sitio. Puede ver una demostración y las instrucciones here.
@-webkit-keyframes roll {
from { -webkit-transform: rotate(0deg) }
to { -webkit-transform: rotate(360deg) }
}
@-moz-keyframes roll {
from { -moz-transform: rotate(0deg) }
to { -moz-transform: rotate(360deg) }
}
@keyframes roll {
from { transform: rotate(0deg) }
to { transform: rotate(360deg) }
}
body {
-moz-animation-name: roll;
-moz-animation-duration: 4s;
-moz-animation-iteration-count: 1;
-webkit-animation-name: roll;
-webkit-animation-duration: 4s;
-webkit-animation-iteration-count: 1;
}
css prefijos fueron una idea tan tonta. –
Añadir un vínculo con algo así:
javascript:(function(){var s=document.createElement('style');s.innerHTML='%40-moz-keyframes roll { 100%25 { -moz-transform: rotate(360deg); } } %40-o-keyframes roll { 100%25 { -o-transform: rotate(360deg); } } %40-webkit-keyframes roll { 100%25 { -webkit-transform: rotate(360deg); } } body{ -moz-animation-name: roll; -moz-animation-duration: 4s; -moz-animation-iteration-count: 1; -o-animation-name: roll; -o-animation-duration: 4s; -o-animation-iteration-count: 1; -webkit-animation-name: roll; -webkit-animation-duration: 4s; -webkit-animation-iteration-count: 1; }';document.getElementsByTagName('head')[0].appendChild(s);}());
Este chico va a hacer el truco en cualquier página web:
@-moz-keyframes roll {
from { -moz-transform: rotate(0deg) }
to { -moz-transform: rotate(360deg) }
}
body {
-moz-animation-name: roll;
-moz-animation-duration: 4s;
-moz-animation-iteration-count: 1;
}
recordar que esto es para Firefox.
si quieres infinita
@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
body{-webkit-animation: spin 9.9s infinite linear;}
- 1. Fórmulas para la distorsión de barril/acerico
- 2. ¿Cómo hace google prueba secuencia de prueba
- 3. ¿Por qué algunas instrucciones ARM no usan barril de cambio?
- 4. ¿Qué hace el @sign?
- 5. ¿Cómo se implementa el/svn-history/path como lo hace Google Code Hosting?
- 6. ¿Cómo hace el cliente REST avanzado de Google Chrome solicitudes de POST de dominio cruzado?
- 7. En C#, ¿cómo implemento el módulo como lo hace google calc?
- 8. ¿Cómo hace Gmail el cometa en Opera?
- 9. ¿Cómo se hace el código reutilizable?
- 10. ¿Cómo se hace el polimorfismo en Ruby?
- 11. ¿Cómo hace Google esos impresionantes informes PDF en Analytics y cuándo imprime un documento de Google Doc, etc.?
- 12. ¿Qué hace el proceso csrss.exe?
- 13. ¿Cómo funciona el geocodificador de Google?
- 14. ¿Cómo lo hace AQTime?
- 15. ¿Qué hace el enlace rel = "index"?
- 16. ¿Qué hace el hilo de fondo GDI +?
- 17. ¿Cómo cambia Google Instant el referer enviado por el navegador?
- 18. ¿Qué hace el método super()?
- 19. ¿Qué hace 's' en el modo visual?
- 20. ¿Cómo se hace el módulo o el resto en Erlang?
- 21. ¿Cómo se hace el multi-arrendamiento en el Proyecto Orchard
- 22. ¿Cómo hace Google Analytics realizar un seguimiento de eventos cuando el usuario navega a otra página dentro de un dominio
- 23. Cómo actualizar el mapa de Google.
- 24. ¿Cómo desencadenar Google Analytics desde el código?
- 25. ¿Cómo escala el servidor HTTP como Google?
- 26. Google+ compartir el enlace
- 27. ¿Cómo agregar google infowindow google dinámicamente?
- 28. que hace !! hacer en ruby?
- 29. ¿Cómo compilar google google-breakpad para windows?
- 30. ¿Cómo integrar Google Spreadsheet con Google Calendar?
Es muy probable que la rotación de CSS. –