carouFredSel responsive height

前端 未结 14 702
一整个雨季
一整个雨季 2021-01-30 11:46

i am having height problems of my responsive carousel using carouFredSel.

since the images are responsive and the carousel is also set to responsive.

It still ad

14条回答
  •  一生所求
    2021-01-30 12:26

    I've had some success in just using CSS media queries to set the dimensions of the caroufredsel_wrapper element, using !important, like this:

    .caroufredsel_wrapper {
        width: 700px !important;
        height: 393px !important;
    }
    @media screen and (max-width: 768px){
        .caroufredsel_wrapper {
            width: 460px !important;
            height: 258px !important;
        }
    }
    

    I was then able to get rid of the onCreate stuff from the above answer. Much more performant too, as binding to the window.resize event can trigger the function many times when dragging the window frame during a single resize.

提交回复
热议问题