谷歌如何滚动?

时间:2021-08-04 00:28:55

If you Google, 'do a barrel roll', the whole page does a 360 rotation. Does anyone have any guesses as to how Google is doing this? I disabled javascript, and it still occurred, so maybe a css rotation?

如果你是谷歌,“滚动滚动”,整个页面会旋转360度。有没有人对Google如何做到这一点有任何猜测?我禁用了javascript,它仍然发生了,所以也许是css轮换?

8 个解决方案

#1


21  

If you look at the css code :

如果你看一下CSS代码:

body {
    -moz-animation-duration: 4s;
    -moz-animation-iteration-count: 1;
    -moz-animation-name: roll;
}

#2


14  

As said above, with CSS3 animations and transform.

如上所述,用CSS3动画和变换。

Wesbo showed a way to apply the effect on any site. You can view a demo and instruction here.

Wesbo展示了一种在任何网站上应用效果的方法。您可以在此处查看演示和说明。

@-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;
}

#3


4  

It's a CSS Transition: https://developer.mozilla.org/en/CSS/CSS_transitions

这是一个CSS转换:https://developer.mozilla.org/en/CSS/CSS_transitions

-moz-transform: rotate(360deg);
-moz-transition-property: all;
-moz-transition-duration: 5s;

Example for Mozilla above, use -o and -webkit to target other browsers.

上面的Mozilla示例,使用-o和-webkit来定位其他浏览器。

#4


2  

It uses custom CSS animations. See the CSS rules applied to the <body> here:

它使用自定义CSS动画。请参阅此处应用于的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;
}

#5


1  

sounds like a css3 rotation transformation applied to either the body or html tags

听起来像是应用于body或html标签的css3旋转变换

#6


1  

Add a link with something like that:

添加类似的链接:

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);}());

#7


0  

This guy will do the trick on any webpage:

这个人会在任何网页上做到这一点:

@-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;
   }

Remember that this is for firefox.

请记住,这是为Firefox。

#8


0  

if you want infinite

如果你想要无限的

 @-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


21  

If you look at the css code :

如果你看一下CSS代码:

body {
    -moz-animation-duration: 4s;
    -moz-animation-iteration-count: 1;
    -moz-animation-name: roll;
}

#2


14  

As said above, with CSS3 animations and transform.

如上所述,用CSS3动画和变换。

Wesbo showed a way to apply the effect on any site. You can view a demo and instruction here.

Wesbo展示了一种在任何网站上应用效果的方法。您可以在此处查看演示和说明。

@-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;
}

#3


4  

It's a CSS Transition: https://developer.mozilla.org/en/CSS/CSS_transitions

这是一个CSS转换:https://developer.mozilla.org/en/CSS/CSS_transitions

-moz-transform: rotate(360deg);
-moz-transition-property: all;
-moz-transition-duration: 5s;

Example for Mozilla above, use -o and -webkit to target other browsers.

上面的Mozilla示例,使用-o和-webkit来定位其他浏览器。

#4


2  

It uses custom CSS animations. See the CSS rules applied to the <body> here:

它使用自定义CSS动画。请参阅此处应用于的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;
}

#5


1  

sounds like a css3 rotation transformation applied to either the body or html tags

听起来像是应用于body或html标签的css3旋转变换

#6


1  

Add a link with something like that:

添加类似的链接:

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);}());

#7


0  

This guy will do the trick on any webpage:

这个人会在任何网页上做到这一点:

@-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;
   }

Remember that this is for firefox.

请记住,这是为Firefox。

#8


0  

if you want infinite

如果你想要无限的

 @-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;}