3
我在CSS3中创建了simple "flip card",当用户将鼠标悬停在卡上时,它会向下翻转并显示另一面。 backface-visibility
设置为hidden
,因此背面将不会显示。但是,当我尝试翻牌时,背面仍然显示出来。背面仍然可见,即使它被设置为“隐藏”
所以我看了一下我发现的working examples,有趣的是我和他有几乎相同的东西,他的确工作,但不是我的。 (这怎么可能?!)继an answer here也不起作用(因为我已经设置好一切backface-visibility
到hidden
)。
这里有一块我的代码:
$(".wrapper").hover(function() {
$(".flip").stop().transition({
perspective: '100px',
rotateX: '-180deg'
}).toggleClass("down");
}, function() {
$(".flip").stop().transition({
perspective: '100px',
rotateX: '0deg'
}).toggleClass("down");
});
为什么这事你知道吗?
唯一支持'transform-style'的非WebKit浏览器是Firefox,它支持不带前缀。 – Ana 2013-03-16 09:37:44
你有部分权利。仅在最新版本的Firefox中才提供不带前缀的支持。 IE10也支持'transform-style',但不支持'preserve-3d'的值。 – zeroflagL 2013-03-16 09:55:39
@zeroflagL - 谢谢,它的确有用。 – 2013-03-16 17:55:32