Stretch and fill image in Bootstrap carousel

前端 未结 14 1425
情歌与酒
情歌与酒 2021-01-11 13:11

I am using bootstrap carousal and having some problem with image height and width. Even though I define it in the img attribute it still displays a

14条回答
  •  情歌与酒
    2021-01-11 13:53

    .item img{
    min-width: 300px;
    min-height: 300px;
    overflow: hidden;}
    .item{
    width: 300px;
    height: 300px;
    overflow: hidden;
    }
    

    you try this css and little change in html. i used different image src for better clearification.

    here is updated fiddle

提交回复
热议问题