html - 为什么我的 CSS 转换不适用于转换 : matrix3d property?

标签 html css

当我将元素的过渡设置为:

transition: transform 1s, -webkit-transform 1s, -moz-transform 1s;
-webkit-transition: transform 1s, -webkit-transform 1s, -moz-transform 1s;
-moz-transition: transform 1s, -webkit-transform 1s, -moz-transform 1s;

当元素的 transform: matrix3d 属性发生变化时,该元素不会进行动画处理。

这是否受支持? Mozilla 表示 transform 属性可用于转换 ( https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties?redirectlocale=en-US&redirectslug=CSS%2FCSS_animated_properties )

为什么它对我不起作用?

我设置了一个 fiddle :http://jsfiddle.net/diracleo/aFudH/1/

最佳答案

在你的 css 规则中你这样写:

transition: transform 1s, -webkit-transform 1s, -moz-transform 1s;
-webkit-transition: transform 1s, -webkit-transform 1s, -moz-transform 1s;
-moz-transition: transform 1s, -webkit-transform 1s, -moz-transform 1s;

但对于应该转换的属性,您应该使用与 transition 之一匹配的相应供应商前缀(如果该属性需要供应商前缀)。

所以它必须看起来像这样:

transition: transform 1s;
-webkit-transition: -webkit-transform 1s;
-moz-transition: -moz-transform 1s;

关于html - 为什么我的 CSS 转换不适用于转换 : matrix3d property?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17075243/

相关文章:

javascript - 移动响应菜单按钮不响应 jquery 单击功能

css - 当父项可拖动时,无法在 <input> 中选择文本

html - Bootstrap : Sticky navigation bar that becomes fixed to the top after scrolling

javascript - 动手元素 7-2 下面的星期几框 选择日期

javascript - 响应式 jquery-steps

html - 使用 CSS 将 div 向上移动到页面上

javascript - 从许多相同的元素中单击时更改 HTML 选择标签

html - 显示(几乎)均匀的一系列缩略图

javascript - 检查浏览器是否支持 MutationObserver

javascript - 选项卡 View 不起作用