Created
February 18, 2019 15:40
-
-
Save Nocktiss/365f0938c459fa3ac9465731d3ace237 to your computer and use it in GitHub Desktop.
Gandalf + 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
.hovering | |
{ | |
position: absolute; | |
} | |
img | |
{ | |
opacity: 0.6; | |
} | |
img:hover | |
{ | |
opacity: 1; | |
} | |
.hovering:hover .text | |
{ | |
font-size: 30px; | |
top: 88%; | |
left: 37%; | |
} | |
.hovering:hover p | |
{ | |
opacity: 0; | |
} | |
p | |
{ | |
border-radius: 10px; | |
padding: 2px 15px 2px; | |
opacity: 0.8; | |
position: absolute; | |
background-color: #ffffff; | |
font-size : 40px; | |
top: 0%; | |
left: 25%; | |
} | |
.text { | |
position: absolute; | |
top: 50%; | |
left: 22%; | |
text-align: center; | |
font-size: 80px; | |
color: white; | |
} | |
span | |
{ | |
color: orange; | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="gandalf.css"> | |
<title> Gandalf </title> | |
</head> | |
<body> | |
<div class="hovering"> | |
<img src="http://images.innoveduc.fr/integration_gandalf.png" alt="gandalf_picture"> | |
<div class="text"><b>Gandalf</b></div> | |
<p> reward <b><span>1000</span></b><br /> golden coins </p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment