Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #104508
    Dark Beccio
    Participant

    Hi,

    I’m using smart carousel to show pictures,

    i noticed that photos are usually zoomed, it seems that it can only handle images with certain dimensions.

    Are there any options I can use to make the carousel fit the different images without cropping them?

    TY

    #104517
    ivanpeevski
    Participant

    Hi Dark Beccio,

    If you’d like to disable the image zooming, you can set the following CSS rule – background-size:contain – to a carousel item.

    For example, the following CSS disabled zooming only for the first item in the Carousel:
    <div>
    <div>smart-carousel div[item-id=”0″] .smart-carousel-item-container{</div>
    <div>  background-size: contain;</div>
    <div>}</div>
    </div>
    <div></div>
    <div>Here is a live demo – the first image is shown in its normal aspect ratio without zooming: stackblitz</div>
    <div></div>
    <div>

    Best Regards,
    Ivan Peevski

    Smart UI Team
    https://www.htmlelements.com/

    </div>
     

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.