Css 旋转木马图像上的RGBA覆盖
我正试图在我的引导旋转木马中的幻灯片上覆盖RGBA。我以为这很简单,但显然不是 我曾尝试使用:before选择器添加背景,但没有成功Css 旋转木马图像上的RGBA覆盖,css,twitter-bootstrap-3,Css,Twitter Bootstrap 3,我正试图在我的引导旋转木马中的幻灯片上覆盖RGBA。我以为这很简单,但显然不是 我曾尝试使用:before选择器添加背景,但没有成功 .carousel-inner>.item>a>img, .carousel-inner>.item>img, .img-responsive, .thumbnail a>img, .thumbnail>img:before { content:'\A'; width:100%; height:100%;
.carousel-inner>.item>a>img, .carousel-inner>.item>img, .img-responsive, .thumbnail a>img, .thumbnail>img:before {
content:'\A';
width:100%; height:100%;
top:0; left:0;
background:rgba(0,0,0,0.6);
}
我怀疑你在找这样的东西:
.carousel-inner>.item {
position: relative;
}
.carousel-inner>.item:before {
content:'';
position: absolute;
width:100%;
height:100%;
top:0;
left:0;
background:rgba(0,0,0,0.6);
}
您需要添加更多详细信息,您的html是什么样子的?你能准备一段吗?