html - CSS 3 Transitions - 使用 Bootstrap 3.2 的闪烁内容

标签 html css twitter-bootstrap transition

当我尝试使用 bootstrap 3.2 和 css3 转换来模拟水平翻转效果时,我遇到了一种奇怪的闪烁效果。发生翻转,但“卡片”背面的内容在转换过程中快速闪烁。我已经包含了问题的 JSFiddle。这发生在 chrome 中。在 IE 中,转换后卡片的背面根本不显示。

我正在使用 backface-visibility: hidden,如代码片段所示

.flippable > figure {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transition: all ease-in-out 0.5s;
}

https://jsfiddle.net/w953nvpq/

提前感谢您对此提供的任何帮助。

最佳答案

backface-visibility : hidden 不起作用,因为它需要 transform-style: preserve-3d 在元素本身,而不是在父元素中

.flippable > figure {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: all ease-in-out 0.5s;
    transform-style: preserve-3d;
}

现在这没用了:

.flippable.flipped .front {
    visibility: hidden;
}

fiddle

关于html - CSS 3 Transitions - 使用 Bootstrap 3.2 的闪烁内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30038913/

相关文章:

javascript - 如何为 Bootstrap4 弹出窗口和工具提示配置 webpack (Popper.js)

html - CSS Tooltip(工具提示显示即使不显示)

javascript - 响应时导航栏固定在顶部

html - 意外的 CSS 行为

jquery 验证不适用于相关 html

php - 不使用 3xx 重定向代码重定向到另一个页面

html - 如何使背景响应不仅垂直或水平,而且两者兼而有之?

CSS: Bulletproof @font-face: 笑脸变体

javascript - 当屏幕尺寸发生变化时,向下滚动过程跟踪线无法正常工作,尤其是对于移动设备

twitter-bootstrap - Bootstrap 折叠无法正常工作,打开后立即关闭