有没有办法调整轮播上一个/下一个按钮的大小?我试图根据高度和宽度调整大小,他们会调整大小,但不会缩放。是否有类似 btn 的 carousel-control-small 类(small-btn 等...)
这是我尝试过的:
<a class="carousel-control right" href="#mainCarousel" data-slide="next" style=" height: 30px; width:30px">›</a>
有没有办法调整轮播上一个/下一个按钮的大小?我试图根据高度和宽度调整大小,他们会调整大小,但不会缩放。是否有类似 btn 的 carousel-control-small 类(small-btn 等...)
这是我尝试过的:
<a class="carousel-control right" href="#mainCarousel" data-slide="next" style=" height: 30px; width:30px">›</a>
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;
}
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
我有同样的问题。我所做的是直接修改CSS。你必须修改类
a.left.carousel-control
和a.right.carousel-control
更改宽度。对于高度,您必须修改轮播本身。
您可以像这样调整上一个/下一个图标的大小
.carousel-control-prev-icon
{
width: 24px;
height: 24px;
}
.carousel-control-next-icon
{
width: 24px;
height: 24px;
}