twitter-bootstrap 如何从引导程序轮播中的字形中删除阴影
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28962324/
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
How to remove shadow from glyphicons in bootstrap carousel
提问by user4583569
I have a bootstrap carousel on my site. The right and left arrow glyphicons which come with it are surrounded by a square grey box of shading. I was wondering if someone could tell me how to remove the shading so I just have the arrows. Do I have to overwrite bootstrap's css somehow?
我的网站上有一个引导轮播。它附带的左右箭头字形被一个方形的灰色阴影框包围。我想知道是否有人可以告诉我如何去除阴影所以我只有箭头。我是否必须以某种方式覆盖引导程序的 css?
回答by jsg
I've had this issue before, just add this as bootstrap offers the shadow as a background image or/and as a filter
我以前遇到过这个问题,只需添加它,因为引导程序将阴影提供为背景图像或/和过滤器
.carousel-control.left, .carousel-control.right {
background-image:none !important;
filter:none !important;
}
And as suggested before i would change the opacity, but to 1
正如之前所建议的那样,我会更改不透明度,但要更改为 1
回答by Ashish Jha
just add <style="background-image: none;">in .carousel control
只需添加<style="background-image: none;">.carousel 控件
回答by Billy Moat
I think what you're referring to is the .carousel-control items.
我认为您指的是 .carousel-control 项目。
This Bootply that I've created should show you what you need to adjust which is the opacity of the element.
我创建的这个 Bootply 应该向您展示您需要调整的元素的不透明度。
http://www.bootply.com/TvRdyXhIxo
http://www.bootply.com/TvRdyXhIxo
Set the opacity to on the normal state and the hover state to whatever you want.
将不透明度设置为正常状态,将悬停状态设置为您想要的任何状态。
.carousel-control {
opacity: 0.5;
}
.carousel-control:hover {
opacity: 0.5;
}
回答by Yousef Altaf
Just add this and make sure it's overwrite the bootstrap.css
只需添加它并确保它覆盖 bootstrap.css
.carousel-control {
background-image:none !important;
filter:none !important;
}

