1

有没有办法调整轮播上一个/下一个按钮的大小?我试图根据高度和宽度调整大小,他们会调整大小,但不会缩放。是否有类似 btn 的 carousel-control-small 类(small-btn 等...)

这是我尝试过的:

<a class="carousel-control right" href="#mainCarousel" data-slide="next" style=" height: 30px; width:30px">&rsaquo;</a>
4

4 回答 4

2
if you are making use of the default boostrap carousel the next and previous icon
 is located in this span below
<span class="carousel-control-next-icon fontIcon" aria-hidden="true"></span>


<span class="carousel-control-next-icon fontIcon" aria-hidden="true"></span>
create a css class like this
.fontIcon{
height: 50px;
width: 50px;
background-color:black;
border-radius: 15px;

}

于 2018-09-08T06:46:50.313 回答
1

per @koala_dev:

No there's no special class for that, you will need to play around with the css until you get them looking the way you want. height and width will scale the circle, for the arrow you need to adjust font-size and probably line-height

于 2013-07-25T06:22:28.870 回答
1

我有同样的问题。我所做的是直接修改CSS。你必须修改类

a.left.carousel-controla.right.carousel-control

更改宽度。对于高度,您必须修改轮播本身。

于 2017-02-15T21:48:53.530 回答
0

您可以像这样调整上一个/下一个图标的大小

.carousel-control-prev-icon 
{
    width: 24px;
    height: 24px;
}
    
.carousel-control-next-icon
{
    width: 24px;
    height: 24px;
}
于 2020-11-10T07:45:59.340 回答