twitter-bootstrap 更改转盘左/右按钮的颜色
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38264340/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Change color of carousel left/right buttons
提问by mheonyae
I want to change the color of the left and right buttons on my carousel. I tryed with background color, but doesnt work. How do i change it?
我想更改轮播上左右按钮的颜色。我尝试了背景颜色,但不起作用。我该如何更改?
here is my carousel code:
这是我的轮播代码:
<div id="myCarousel" class="carousel slide">
<div class="carousel-inner">
<div class="item active">
<div class="col-xs-4"><a href="#"><img src="<?php bloginfo('template_url');?>/images/html_brand.jpg" class="img-responsive"></a></div>
<div class="col-xs-4"><a href="#"><img src="<?php bloginfo('template_url');?>/images/css_brand.jpg" class="img-responsive"></a></div>
<div class="col-xs-4"><a href="#"><img src="<?php bloginfo('template_url');?>/images/js_brand.jpg" class="img-responsive"></a></div>
</div>
<div class="item">
<div class="col-xs-4"><a href="#"><img src="<?php bloginfo('template_url');?>/images/jq_brand.jpg" class="img-responsive"></a></div>
<div class="col-xs-4"><a href="#"><img src="<?php bloginfo('template_url');?>/images/json_brand.jpg" class="img-responsive"></a></div>
<div class="col-xs-4"><a href="#"><img src="<?php bloginfo('template_url');?>/images/wp_brand.jpg" class="img-responsive"></a></div>
</div>
</div>
<!-- Controls-->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
回答by max
Change color property of this selector:
更改此选择器的颜色属性:
.carousel-control {
color: #bada55;
}
回答by T J
Default arrows are glyphicons which is text based icons. Change their colorproperty.
默认箭头是字形,它是基于文本的图标。改变他们的color财产。
For example
例如
.glyphicon.glyphicon-chevron-right{
color:red;
}
回答by dr. strange
add following css
添加以下css
<style>
.carousel-control.right{ opacity:1 !important;color:red;}
</style>

