Created
November 11, 2019 07:56
-
-
Save 51enra/a39f61083fc9a142a3a5f1fe3c1efcec to your computer and use it in GitHub Desktop.
Gandalf image
This file contains hidden or 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="picture"> | |
<img src="http://images.innoveduc.fr/integration_gandalf.png"> | |
<div class="cover"> | |
<div class="reward"> | |
Reward <span class="amount">1000</span><br> golden coins | |
</div> | |
<div class="name">Gandalf</div> | |
</div> | |
</div> |
This file contains hidden or 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
.picture { | |
position: absolute; | |
font-family: Arial; | |
display: flex; | |
} | |
.cover { | |
position: absolute; | |
background-color: rgba(255,255,255,0.4); | |
width: 100%; | |
height: 100%; | |
display: flex; | |
flex-direction: column; | |
justify-content: flex-start; | |
align-items: center; | |
} | |
.reward { | |
font-size: 2em; | |
background-color: rgba(255,255,255,0.8); | |
padding: 0.5em 2em; | |
margin: 1em; | |
border-radius: 10px; | |
} | |
.amount { | |
color: orange; | |
} | |
.name { | |
font-size: 3.5em; | |
color: white; | |
padding: 2em 0em; | |
} | |
.cover:hover { | |
background-color: rgba(0,0,0,0); | |
justify-content: flex-end; | |
} | |
.cover:hover >.reward { | |
display: none; | |
} | |
.cover:hover .name { | |
font-size: 1.5em; | |
} |
This file contains hidden or 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
https://codepen.io/51enra/full/oNNyyXq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment