twitter bootstrap custom carousel indicators

前端 未结 2 876
暗喜
暗喜 2021-01-14 01:24

I want to change the carousel indicators with something like this:

\"custom

I ha

2条回答
  •  别那么骄傲
    2021-01-14 02:13

    It's collapsing because the width of your carousel-indicator is 320px. You can't have fixed with if you also want your code to be responsive on mobile. You can substitute percentage rather than using a fixed width

    .carousel-indicators li{
        background: url(images/triangle.png) no-repeat;
        max-width:25%;
        max-height:15%; /*or any other percentage that would look good*/
        cursor: pointer;
        text-align:center;
    }
    

    Note that I used max-height and max-height so that I could keep the proportion of the image so it doesn't get stretched out in either direction.

提交回复
热议问题