- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有以下代码: http://jsfiddle.net/RFMxG/1/
当过渡运行时,您可以在左侧看到大约 20-30 像素的填充。尽管我已经将 transform-origin 设置为 0,0,0,但它仍然没有正确地绕 y 轴旋转。在动画期间,蓝色框的左边缘应始终与左边缘齐平。
谁能告诉我我做错了什么?
最佳答案
好吧,这里有一大堆问题:
1) CSS 变换不能使用过渡动画。如果您查看 W3C list在可转换属性中,您会注意到转换不存在。
2) -webkit-perspective
只影响应用它的元素的子元素,而不影响元素本身。阅读 Safari blog对此:
The interesting thing about -webkit-perspective is that it does not affect the element directly. Instead, it affects the appearance of the 3D transforms on the transformed descendants of that element; you can think of it as adding a transform that gets multiplied into the descendant transforms. This allows those descendants to all share the same perspective as they move around.
3) 你发布了一个 fiddle 真是太棒了,但由于这是一个 CSS 问题,为了将来的引用,如果你清除所有的 javascript,并且只使用一组浏览器前缀,就会容易得多。帮助我们帮助您!
4) 您可能想要使用的是动画。这是您的 fiddle 的高度修改版本,可在悬停时使用:
5) 如果 javascript 是您的技能集,并且您完全关心浏览器兼容性(您当然是!),我强烈建议使用 jstween 制作此类动画。 .
关于CSS3 rotateY transition 没有正确地绕 y 轴旋转,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10815269/
我正在编写国际象棋人工智能程序,并且在实现棋子方格表时遇到了问题。由于我只想每边有一张正方形 table ,因此我需要一个函数来翻转保存 x 轴值的一维数组。例如,这个数组: [ 2, 4, 5, 3
在应用程序中,在尝试使用触摸旋转对象时,我注意到一段时间后对象的位置发生了漂移(没有应用任何平移!!)。旋转仅围绕 z 轴,工作正常,但仅在旋转几次后才会发生漂移。 ds 将用于进行翻译(使用上下按钮
我正在尝试构建金字塔并为其设置动画。问题是在围绕 X 轴旋转它之后,我尝试围绕金字塔的高度(Y 轴)旋转它,但我每次都在移动。我基本上尝试了每个 transform-origin 选项,但它不起作用。
我需要绕其 x 轴(或 y 轴)旋转图像。我可以使用 avisynth 轻松创建这样的动画,但现在我需要使用 Python 的 moviepy 模块来实现该效果。我可以使用以下脚本轻松旋转图像,但需要
我有一个图像被分成两个相等的部分。我正在尝试在悬停时围绕 y 轴将图像的右侧部分旋转 -180°(逆时针)。 问题是有时(随机)图像旋转 180°(顺时针)而不是 -180°(逆时针)。这背后的原因可
如何使用CGAffineTransform(或其他)绕其Y轴旋转UIView?例如,我尝试过: self.image.transform = CGAffineTransform(rotationAng
我正在尝试围绕 y 轴旋转查看器。我有一个名为 tranform_eye() 的函数,它将计算 eyex、eyey 和 eyez 的下一个位置更新。 谁能帮我弄清楚如何计算 eyex、eyey 和 e
我无法解决我遇到的一个奇怪的错误,想知道是否有其他人遇到过类似的问题或可以提供解决方案。 我正在使用 javascript 访问 iOS 设备上的陀螺仪,并且对围绕 z 轴的旋转很感兴趣;我想要设备平
Qt 使用 3x3 变换矩阵进行透视变换和仿射变换。如果矩阵的最后一行等于 [0 0 1],则矩阵被认为是仿射的。由于这个原因,x 轴和 y 轴旋转矩阵是“非仿射”和透视失真结果。但还有进一步的影响。
我是一名优秀的程序员,十分优秀!