【问题标题】:Table not responsive in Firefox, Works in Chrome表格在 Firefox 中没有响应,在 Chrome 中有效
【发布时间】:2014-03-26 21:03:33
【问题描述】:

首先让我们通过在 Firefox 和 chrome 中调整大小来查看这个 Fiddle

我也试过这个Why do Firefox and Opera ignore max-width inside of display: table-cell?,但没有成功。

table img { display:block }

【问题讨论】:

标签: html css


【解决方案1】:

检查这个demo jsfiddle

你使用max-width,但实际上它的意思是original image size。这就是为什么不在Firefox上工作的原因。您应该将max-width 修改为width 并分配100% 以在所有浏览器上工作。

CSS

 img {
    width: 100%;  // before: max-width: 100%;
    display: block;
}

希望对您有所帮助!

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2021-03-12
  • 2012-11-28
  • 2020-02-10
  • 2016-02-19
  • 2022-01-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多