【问题标题】:Vertical responsive image (max-height) not working in Firefox垂直响应图像(最大高度)在 Firefox 中不起作用
【发布时间】:2013-08-17 13:29:10
【问题描述】:

我正在寻找一种方法将图像设置为浏览器窗口的 100% 高度(底部有一个小填充),以页面为中心。

我在 codepen 中设置了一个示例,该示例在 Chrome 和 Safari 中效果很好,但在 Firefox 中效果不佳,图像以全尺寸显示。我错过了什么?

http://cdpn.io/sHJhl

【问题讨论】:

    标签: image firefox responsive-design css


    【解决方案1】:

    .photo-bkg 也需要它的height 集:

    .photo-bkg { height: 100%; }
    

    Here's a working fork of your pen.

    【讨论】:

      猜你喜欢
      • 2012-08-03
      • 1970-01-01
      • 2011-10-01
      • 1970-01-01
      • 2017-10-02
      • 1970-01-01
      • 2014-02-04
      • 2013-06-01
      • 1970-01-01
      相关资源
      最近更新 更多