我試圖用css覆蓋每個圖像到紅色的背景顏色,但到目前爲止我還沒有成功和所有封閉的圖像疊加。每個圖像懸停的css顏色疊加
有什麼想法?
.gallery-overlay {
background: rgba(200,30,30,0.5);
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: none;
}
.gallery-images:hover .gallery-overlay {
display: block;
}
<div class="box-recent-gallery">
\t <div class="gallery-images">
\t \t <img src="http://placehold.it/100x100">
\t \t <div class="gallery-overlay"></div>
\t </div>
\t <div class="gallery-images">
\t \t <img src="http://placehold.it/100x100">
\t \t <div class="gallery-overlay"></div>
\t </div>
\t <div class="gallery-images">
\t \t <img src="http://placehold.it/100x100">
\t \t <div class="gallery-overlay"></div>
\t </div>
</div>
是的非常好,謝謝 –
這個答案檢查,如果這可以幫助你,並投票它:) – rmarif