调整图像大小以适合div工作,但不是在Firefox中 [英] Resize image to fit div works but not in Firefox
本文介绍了调整图像大小以适合div工作,但不是在Firefox中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在此网页上,由于某种原因,Firefox正在创建图片的完整大小,但它正确调整大小以适应Chrome和其他浏览器。
我不知道为什么这不工作在Firefox。
有谁知道如何使这项工作正常? p>
这是我的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%
或只使用两者。
On this page I'm creating, for some reason the image is full size in Firefox, but it correctly resizes to fit Chrome and other browsers.
I have no idea why this isn't working in Firefox.
Does anyone know how to make this work properly?
Here is my 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%;
}
解决方案
Change max-width: 100%
to width: 100%
or just use both.
这篇关于调整图像大小以适合div工作,但不是在Firefox中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文