Last active
December 21, 2017 10:29
-
-
Save mrkkr/77eb0978917aa7ec469700517c96ff5a to your computer and use it in GitHub Desktop.
Tekst z linkiem onhover na kaflu (gridzie) #html #css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="galeria"> | |
<a href="#link"> | |
<div id="kafel"> | |
<div id="gallery-hover-content"> | |
Only show this when hovering parent | |
</div> | |
</div> | |
</a> | |
</div> | |
<style> | |
.galeria .gallery-hover-content { | |
display: none; | |
} | |
.kafel:hover .gallery-hover-content { | |
display: block; | |
text-decoration: none; | |
text-transform: uppercase; | |
} | |
.kafel { | |
background-image: url('.../image/image.jpg'); | |
background-repeat: no-repeat; | |
background-size: cover; | |
background-position: center; | |
} | |
.kafel:hover { | |
background-color: rgba(7,8,8,1); | |
background-image: none; | |
display: flex; | |
display: -webkit-flex; | |
display: -ms-flexbox; | |
-webkit-justify-content: center; | |
justify-content: center; | |
align-items: center; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment