Make division image responsive

前端 未结 5 706
借酒劲吻你
借酒劲吻你 2021-01-16 06:49

I am stuck in making images inside background of a class responsive.The website url .

It would be very helpful if you could help me out i am using bootstrap and nivo

5条回答
  •  鱼传尺愫
    2021-01-16 07:29

    i found the answer.It was posted to me by a user.So I'm sharing it if anyone else gets into any trouble:

    "So to not have all the things in the comments I post an answer.

    The "problem" on screen-/ viewport widths of 380px and below has several issues.

    On your outer

    with the class slider-wrapper3 (it's the one which holds the iPhone as background image) you should use the following in your CSS:

    .slider-wrapper3 {
       background-size: contain; /* you use cover */
       background-repeat: no-repeat;
       /* keep the rest of your actual code */
    }
    

    and remove the width setting (width: 310px;) at least for your small screen layout!

    By doing so you have then fixed the position and size of the container (and also the background image).

    So you still need to adjust the image sizes (probably in your slider script, or wherever the image's dimensions come from)."

提交回复
热议问题