Copyright © 2000-2016 www.knowsky.com All rights reserved | 沪ICP备05001343号

王朝学院·作者佚名  2016-05-24
窄屏简体版  字體: 小  |  中  |  大  |  超大  

关于 CSS3 backface-visiable 与 overflow 属性的冲突最近在做一个 flip 效果的时候发现一个奇怪的问题,设置了backface-visiable:hidden;overflow:hidden 的元素反转180度以后背面没有被隐藏,最终还是被Google出来了,overflow会覆盖transform-style: PReserve-3d属性,还有以下一些元素会导致transform-style: preserve-3d失效:参考地址:http://codepen.io/thebabydino/details/rACblDon't set overflow: hidden on elements with 3D transformed childrenByAna TudorDESCRIPTIONThe 'back' face of the card has arotateY(180deg)set on it. Both faces havebackface-visibility: hiddenset. Setting overflow: hidden on their parent (the card) causes the 3D transformed face ('back' face) to disappear andbackface-visibility: hiddento be ignored for the other.

From the spec (link):

The following CSS property values require the user agent to create a flattened representation of the descendant elements before they can be applied, and therefore override the behavior oftransform-style: preserve-3d:

overflow: any value other thanvisible.

filter: any value other thannone.

clip: any value other thanauto.

clip-path: any value other thannone.

isolation: used value ofisolate.

mask-image: any value other thannone.

mask-box-source: any value other thannone.

mix-blend-mode: any value other than normal.

The computed value oftransform-styleis not affected.

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
© 2005- 王朝網路 版權所有 導航