我在本网站的主页上使用了第 3 方全屏 slider 。每张幻灯片中的图像设置为不大于 75% 宽度,它似乎在 Safari 和 Chrome 中有效,但在 IE (11) 或 Firefox 中无效。
知道这个是怎么回事吗?
最佳答案
设置你的宽度以使其与 IE 一起工作
#main-content #fullpage .section img, #main-content #fullpage .slide img {
width: 100%;
max-width: 75% !important;
}
此外,!important 不是必需的。
编辑
.fp-tableCell div 被设置为其中图像的宽度。 在文件 jquery.fullpage.min.js 中添加 max-width:100vh 来解决问题:
.fp-tableCell {
display: table-cell;
vertical-align: middle;
width: 100%;
height: 100%;
max-width: 100vw;
}
关于css - Firefox/IE CSS 问题 - 图像未按百分比缩放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27159531/