如何使用 Html/Css 去除滑块背景的阴影?
How to remove shadow from slider backround using Html/Css?
来源:http://www.salefee.com/
我已将上述网站的主页选项卡背景更改为浅蓝色。但是我无法去除极左和极右的阴影,这使得两边看起来有点暗。有什么方法可以使主页选项卡上的颜色在每个地方都显得均匀吗?
提前致谢!!
你可以这样试试
CSS
.carousel-control.left,
.carousel-control.right {
background-image: none;
}
如果它不起作用,请尝试像这样添加重要内容
background-image: none !important;
很简单:
在您的 css 文件中使用以下代码:
更正 CSS:
.carousel-control.left,
.carousel-control.right
{
backround-image:none !important;
}
为什么会出现阴影:
出现阴影是因为您的滑块有两个链接或标签,当我检查它们的 css (bootstrap.min.css) 时,我看到它们应用了背景图像。
<a class="left carousel-control" data-slide="next" href="#slideshow-carousel-1">
<a class="right carousel-control" data-slide="next" href="#slideshow-carousel-1">
Css 导致此效果:
这是导致阴影效果的 "bootstrap.min.css" 代码部分。
.carousel-control.left
{
background-image: linear-gradient(to right, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);
}
.carousel-control.right
{
background-image: linear-gradient(to right, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);
}
如您所见,css 是造成滑块阴影效果的原因。希望这有帮助
来源:http://www.salefee.com/ 我已将上述网站的主页选项卡背景更改为浅蓝色。但是我无法去除极左和极右的阴影,这使得两边看起来有点暗。有什么方法可以使主页选项卡上的颜色在每个地方都显得均匀吗? 提前致谢!!
你可以这样试试
CSS
.carousel-control.left,
.carousel-control.right {
background-image: none;
}
如果它不起作用,请尝试像这样添加重要内容
background-image: none !important;
很简单: 在您的 css 文件中使用以下代码:
更正 CSS:
.carousel-control.left,
.carousel-control.right
{
backround-image:none !important;
}
为什么会出现阴影: 出现阴影是因为您的滑块有两个链接或标签,当我检查它们的 css (bootstrap.min.css) 时,我看到它们应用了背景图像。
<a class="left carousel-control" data-slide="next" href="#slideshow-carousel-1">
<a class="right carousel-control" data-slide="next" href="#slideshow-carousel-1">
Css 导致此效果:
这是导致阴影效果的 "bootstrap.min.css" 代码部分。
.carousel-control.left
{
background-image: linear-gradient(to right, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);
}
.carousel-control.right
{
background-image: linear-gradient(to right, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);
}
如您所见,css 是造成滑块阴影效果的原因。希望这有帮助