简体   繁体   English

如何更改轮播活动指示器的颜色-Bootstrap

[英]How to change the carousel active indicator color - Bootstrap

I want to change the carousel active indicator color. 我想更改轮播活动指示器的颜色。 Here is the example 这是例子

http://www.w3schools.com/bootstrap/trybs_theme_band_full.htm#band http://www.w3schools.com/bootstrap/trybs_theme_band_full.htm#band

I want to change from white to red 我想从白色变成红色

The Bootstrap style the controls the carousel active dot is .carousel-indicators .active so: Bootstrap样式控制轮播活动点是.carousel-indicators .active因此:

.carousel-indicators .active{
    background-color: #f00;
}

Can change the content of the control links by removing the SVG icon and changing it to a font-awesome icon. 可以通过删除SVG图标并将其更改为超棒的字体图标来更改控件链接的内容。 The icon can then be styled by adding a class to it. 然后可以通过向其添加类来设置图标的样式。 EG 例如

<a class="carousel-control-prev" href="#carouselProfileMedia" role="button" data-slide="prev">
    <i class="fa fa-arrow-circle-left fa-2x your-custom-class" aria-hidden="true"></i>
    <span class="sr-only">Previous</span>
</a>

Try this: 尝试这个:

// CSS rule and invert the color, from black to white, using invert() .5 is gray

// we can use sepia() to turn our gray into a brown

// Using saturate() and hue-rotate(), we can fiddle with these values until we arrive at the desired color.

filter: invert(.5) sepia(1) saturate(5) hue-rotate(175deg);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM