Bootstrap Carousel image doesn't align properly

前端 未结 13 1397
轮回少年
轮回少年 2020-12-02 07:10

Please take a look at the following image, we are using bootstrap carousel to rotate the images. However, when the window width is large, the image doesn\'t align with the b

13条回答
  •  醉梦人生
    2020-12-02 07:38

    @Art L. Richards 's solution didn't work out. now in bootstrap.css, original code has become like this.

    .carousel .item > img {
      display: block;
      line-height: 1;
    }
    

    @rnaka530 's code would break the fluid feature of bootstrap.

    I don't have a good solution but I did fix it. I observed the bootstrap's carousel example very carefully http://twitter.github.com/bootstrap/javascript.html#carousel.

    I find out that img width has to be larger than the grid width. In span9, width is up to 870px, so you have to prepare a image larger than 870px. If you have more container outside the img, as all the container has border or margin something, you can use image with smaller width.

提交回复
热议问题