I'm struggling with a blinking hover effect in my gallery made with HTML and CSS. I've been searching for a solution but can't seem to fix it. Can anyone offer some help?
Check out the code on jsfiddle.com
HTML:
<div id="gallery">
<div class="col-sm-6 photo-1">
<div class="transparent-gallery">
<h3>Photo Caption</h3>
<p>Donec sodales semper porttitor.</p>
</div>
</div>
</div>
CSS:
#gallery .photo-1{
background-image:url(http://img2.wikia.nocookie.net/__cb20130326013809/camp-dublin-roleplay/images/e/ec/Camden-town.jpg);
background-size: cover;
height:300px;
}
.transparent-gallery{
background: rgba(36, 43, 46, 0.8);
background-size: cover;
height:300px;
width:100%;
position:absolute;
text-align: center;
}
.transparent-gallery h3, .transparent-gallery p{
visibility:hidden;
}
.transparent-gallery:hover h3, .transparent-gallery:hover p{
visibility:inherit;
}
.transparent-gallery:hover{
background: rgba(36, 43, 46, 0.95);
height:110px;
top:200px;
}
I'm new to coding so I know there is room for improvement in this code...