Last active
February 10, 2018 21:19
-
-
Save AurelieBayre/76da16b414231dd9153891c5cea01a4c to your computer and use it in GitHub Desktop.
Wanted: Gandalf
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
body { | |
font-family: 'Open Sans', sans-serif; | |
} | |
.wanted { | |
display: inline-block; | |
position: relative; | |
text-align: center; | |
} | |
.rewardInfo { | |
background: rgba(255, 255, 255, 0.2); | |
position: absolute; | |
top: 0; | |
height: 100%; | |
width: 100%; | |
} | |
.amountBox { | |
display: inline-block; | |
width: 70%; | |
} | |
.amount { | |
background: rgba(255, 255, 255, 0.7); | |
border-radius: 10px; | |
font-size: 2em; | |
padding: 10px 5px 10px 5px; | |
} | |
.highlight { | |
color: orange; | |
} | |
.name { | |
color: white; | |
font-size: 70px; | |
margin-top:20%; | |
} | |
/* hover effect */ | |
.wanted:hover .amount { | |
display: none; | |
} | |
.wanted:hover .name { | |
font-size: 30px; | |
margin-top: 90%; | |
} | |
.wanted:hover .rewardInfo { | |
background-color: rgba(255, 255, 255, 0) | |
} |
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> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Wanted!</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> | |
<link rel="stylesheet" type="text/css" href="gandalfStyle.css"> | |
</head> | |
<body> | |
<div class="wanted"> | |
<img src="http://images.innoveduc.fr/integration_gandalf.png" alt="Gandalf smoking his pipe, black and white portrait"> | |
<div class="rewardInfo"> | |
<div class="amountBox"> | |
<p class="amount">Reward <span class="highlight">1000</span> <br/>golden coins</p> | |
</div> | |
<p class="name">Gandalf</p> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment