且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用CSS“max-height:100%”的动态图像大小调整不工作在Firefox和IE与固定的页眉/页脚

更新时间:2023-10-30 23:05:28

只需添加 overflow-x:auto

just add overflow-x:auto in

.photocontainer{
    position: relative;
    display:inline-block;
    float:left;
    top:110px;
    max-height:calc(100% - 155px);
    max-height:-webkit-calc(100% - 155px);
    max-height:-moz-calc(100% - 155px);
    max-height:-ms-calc(100% - 155px);
    max-height:-o-calc(100% - 155px);
    height:auto;
    margin:0px;
    padding:0px;
    left:0px;
    bottom:0px;
    white-space: nowrap;
    overflow-x:auto;
}

我检查了您的现场版本 检查元素及其工作完美

I checked your live version in inspect element and its working perfectly