Bootstrap carousel width and height

前端 未结 8 1521
不思量自难忘°
不思量自难忘° 2020-12-12 20:55

Im trying to do a bootstrap carousel with full width for the images (width: 100%) and a fixed height but if I set the width to 100% the height automacally is taking the 100%

8条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-12 21:26

    I found that if you just want to change the height of the element the image takes up, this will be the code that will help

    .carousel-item { height: 600px !important; }

    however, this won't make the size of the image dynamic, it will simply crop the image to its size.

提交回复
热议问题