在没有媒体查询的情况下动态调整div中的溢出滚动

时间:2014-10-02 07:50:59

标签: javascript jquery html css html5

只是想知道是否有一种“更简单”的方法来调整滚动条的大小,而不仅仅是使用媒体查询?

如果我必须使用媒体查询,那么我必须调整所有可能的屏幕分辨率!

代码示例!

@media only screen and (min-height: 700px)
and (max-height: 750px){
    #Container {
        height: 580px !important;
    }
}

@media only screen and (min-height: 750px)
and (max-height: 900px){
    #Container {
        height: 680px !important;
    }
}

@media only screen and (min-height: 900px) {
    #Container {
        height: 750px !important;
    }
}





#Container {
    max-width: 100% !important;
    width: auto !important;
    overflow: auto;

}

0 个答案:

没有答案