Twitter Bootstrap carousel different height images cause bouncing arrows

后端 未结 14 989
刺人心
刺人心 2020-12-07 16:11

I\'ve been using Bootstrap\'s carousel class and it has been straightforward so far, however one problem I\'ve had is that images of different heights cause the arrows to bo

14条回答
  •  温柔的废话
    2020-12-07 17:04

    The solution given earlier leads to a situation where images may be too small for the carousel box. A proper solution to the problem of bumping controls is to override Bootstraps CSS.

    Original code:

    .carousel-control {
    top: 40%;
    }
    

    Override the variable with a fixed value inside your own stylesheet (300px worked in my design):

    .carousel-control {
    top: 300px;
    }
    

    Hopefully this will solve your problem.

提交回复
热议问题