【问题标题】:Unslider - Responsive HeightUnslider - 响应高度
【发布时间】:2015-02-19 14:35:54
【问题描述】:

我正在尝试使用Unslider,但很难让高度自动响应。好像不能改变高度,只有宽度可以。

here's a jsfiddle

.banner {
position: relative;
width: 100%;
overflow: auto;

font-size: 18px;
line-height: 24px;
text-align: center;
background: #fff;
margin-left: 10px;
margin-right: 10px;
height: auto;
}


.banner ul {
    list-style: none;
    width: 300%;
    background-repeat: no-repeat;
}

.banner ul li {
    display: block;
    float: left;
    width: 33%;
    height: auto;
background-repeat: no-repeat;
    background-size: 100%;

}

希望这是足够的洞察力,但如果您需要更多代码,请告诉我。

【问题讨论】:

    标签: jquery html css slider


    【解决方案1】:

    Fiddle Demo

    试试这个

    .banner {
        position: relative;
        width: 96%;
        overflow: auto;
        font-size: 18px;
        line-height: 24px;
        text-align: center;
        background: #fff;
        margin-left: 2%;
        margin-right: 2%;
        height: auto;
    
    }
    

    【讨论】:

    • 不幸的是,这不起作用。里面的图像会调整为自动高度,但框架本身仍然保持固定高度。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-10-02
    • 2017-12-17
    • 2019-02-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-30
    相关资源
    最近更新 更多