html - 调整图像大小以适合 div 有效但不适用于 Firefox

标签 html css

关于 this page我正在创建,由于某种原因,图像在 Firefox 中是完整大小,但它正确调整大小以适合 Chrome 和其他浏览器。
我不知道为什么这在 Firefox 中不起作用。
有谁知道如何使它正常工作?

这是我的CSS:

#map-wrap {
    display: table;
    margin: 0 auto;
}

#map {
    width: 75%;
    display: inline-block;
}

#space-holder {
    width: 3%;
    display: inline-block;
}

#map-options {
    width: 22%;
    display: inline-block;
    vertical-align: top;
}

#map img {
    max-width: 100%;
    max-height: 100%;
}

最佳答案

max-width: 100% 更改为 width: 100% 或同时使用两者。

关于html - 调整图像大小以适合 div 有效但不适用于 Firefox,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14970591/

相关文章:

css - 将 bootstrap modal-body 内容更改为可滚动

html - 将滚动条添加到没有设置高度的 div

html - 如何在 CSS 中添加很棒的字体

css - 使用 CSS 创建页眉、页脚和左侧栏

javascript - jQuery Dim 或在悬停时更改其他列表项

html - 在 ActionScript 中从 data-in-uri(base64 编码的 PNG)创建图像

html - 如何在SVG旋转期间保持文本方向不变

javascript - 如何为网页创建配色方案生成器

css - 如何在 HTML Canvas 中的移动分辨率上添加另一个图标

html - opencart 2.0.1.1 中缺少图标