如果你是谷歌,'做桶滾動',整個頁面360度旋轉。有沒有人有任何猜測Google如何做到這一點?我禁用JavaScript,它仍然發生,所以也許一個CSS輪換?谷歌如何做滾桶?
谷歌如何做滾桶?
回答
如果你看一下CSS代碼:
body {
-moz-animation-duration: 4s;
-moz-animation-iteration-count: 1;
-moz-animation-name: roll;
}
其中roll是類似於 @ -webkit-keyframes roll { \t from {-webkit-transform:rotate(0); } \t to {-webkit-transform:rotate(360deg); } } – wave
令人討厭的JavaScript動畫已經死了!所有的雹子都令人討厭的CSS動畫! –
這是一個CSS過渡:https://developer.mozilla.org/en/CSS/CSS_transitions
-moz-transform: rotate(360deg);
-moz-transition-property: all;
-moz-transition-duration: 5s;
實施例的Mozilla以上,使用-o
和-webkit
靶向其他瀏覽器。
聽起來像適用於任何身體或html標籤
它使用自定義的CSS動畫一個CSS3旋轉transformation。查看應用到這裏<body>
的CSS規則:
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;
}
正如上面所說,用CSS3動畫和變換。
Wesbo展示了一種在任何網站上應用該效果的方法。您可以查看演示和指令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前綴是這樣一個愚蠢的想法。 –
添加一個鏈接有類似的東西:
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);}());
這傢伙會做的伎倆在任何網頁:
@-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;
}
請記住,這是Firefox瀏覽器。
如果你想無限
@-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. 谷歌雲Storrage桶域Permision
- 2. etherpad和谷歌文檔如何做ChangeSets
- 3. 如何在谷歌代碼中回滾
- 4. 在谷歌桶上的CORS配置
- 5. 谷歌雲存儲桶備份/恢復
- 6. 谷歌存儲桶上傳權限
- 7. 谷歌雲存儲桶內容
- 8. 如何從谷歌雲存儲桶下載對象?
- 9. 如何映射存在的域,並存在谷歌Cloud Storage桶
- 10. 在沒有谷歌存儲桶的情況下利用谷歌的雲CDN
- 11. 谷歌雲平臺 - 如何將圖像文件上傳到谷歌雲存儲桶?
- 12. 如何從谷歌
- 13. 如何解決403被禁止訪問存儲桶谷歌雲存儲
- 14. 如何做一個OR查詢谷歌應用程序引擎
- 15. 安裝谷歌雲SDK錯誤,如何做乾淨安裝?
- 16. 如何在谷歌地圖做標記管理
- 17. 如何做兩列查找來產生摘要? (谷歌張)
- 18. 谷歌oauth&apis如何做到這一點
- 19. 谷歌字體在Outlook 2013中如何與HTML做出反應?
- 20. 谷歌語音如何做到這一點
- 21. 如何回滾到谷歌瀏覽器55
- 22. 如何禁用滾動縮放。谷歌地圖嵌入API
- 23. 如何在滾動位置上平移谷歌地圖
- 24. 如何滾動imageview上的textview像谷歌播放
- 25. 如何添加自動texview滾動像谷歌翻譯
- 26. 谷歌地圖API - 如何停止滾動(JavaScript)
- 27. 谷歌標記點擊做功能
- 28. 谷歌可以做基本的JavaScript?
- 29. 谷歌雲扳手:做我自己試
- 30. 谷歌CheckCookie鏈接做什麼?
這是最有可能的CSS旋轉。 –