CSS -webkit- vs -moz-transition
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2793984/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
-webkit- vs -moz-transition
提问by theorise
I am using CSS3 transitions on my site and the -webkit- seems to be working, whilst the -moz- is not.
我在我的网站上使用 CSS3 过渡,并且 -webkit- 似乎正在工作,而 -moz- 则没有。
Here is the CSS:
这是CSS:
article {z-index: 2; float: left; overflow: hidden; position: relative; -webkit-transition: -webkit-transform 0.2s ease-in-out; -moz-transition: -moz-transform 0.2s ease-in-out; }
.mousedown{-webkit-transform: translate(-180px, 0) !important; -moz-transform: translate(-180px, 0) !important; }
Just using jQuery to add the mousedown class onto the article.
只需使用 jQuery 将 mousedown 类添加到文章中即可。
Any idea where I am going wrong?
知道我哪里出错了吗?
回答by samvermette
Firefox 4 and above supports -moz-transition
. See the documentation page.
Firefox 4 及以上版本支持-moz-transition
. 请参阅文档页面。
回答by Miriam Suzanne
UPDATE: see comments. Support for -moz-transition has now been added. Yay!
更新:见评论。现在已添加对 -moz-transition 的支持。好极了!
There is no such thing as -moz-transition (yet), sorry. Mozilla will do transforms, but webkit is still the only engine rendering transitions.
没有 -moz-transition(还)这样的东西,抱歉。Mozilla 会做转换,但 webkit 仍然是唯一的引擎渲染转换。
回答by RabidZombie
Currently, transitions aren't supported on CSS transforms in Mozilla.
目前,Mozilla 中的 CSS 转换不支持过渡。
回答by Radu
Support for -moz-transition has been added in Gecko 1.9.3 (Firefox 3.7), so right now -moz-transition will only work in a Firefox 3.7 alpha release or Minefield (Firefox nightly build).
Gecko 1.9.3 (Firefox 3.7) 中添加了对 -moz-transition 的支持,所以现在 -moz-transition 仅适用于 Firefox 3.7 alpha 版本或 Minefield(Firefox nightly build)。
回答by joachim
opera is supporting it since 10.5, and much better than webkit
Opera 从 10.5 开始支持它,并且比 webkit 好得多
回答by Arun Kumar
CSS transitions, provide a way to control animation speed when changing CSS properties. Instead of having property changes take effect immediately, you can cause the changes in a property to take place over a period of time. For example, if you change the color of an element from white to black, usually the change is instantaneous. With CSS transitions enabled, changes occur at time intervals that follow an acceleration curve, all of which can be customized.
CSS 过渡,提供了一种在更改 CSS 属性时控制动画速度的方法。您可以使属性更改在一段时间内发生,而不是立即生效。例如,如果您将元素的颜色从白色更改为黑色,通常这种更改是即时的。启用 CSS 转换后,更改会按照加速曲线的时间间隔发生,所有这些都可以自定义。