Skip to content

Instantly share code, notes, and snippets.

@tiga-tiga
Last active February 12, 2018 23:29
Show Gist options
  • Save tiga-tiga/4acb60f0fd2db36b1ec708eaee787785 to your computer and use it in GitHub Desktop.
Save tiga-tiga/4acb60f0fd2db36b1ec708eaee787785 to your computer and use it in GitHub Desktop.
div
{
width: 300px;
height: 400px;
align-content: center;
}
.reward
{
background: url(http://images.innoveduc.fr/integration_gandalf.png) ;
background-size: cover;
opacity: 0.5;
text-align: center;
display: inline-block;
padding-top: 30px;
}
.text_reward
{
width: 250px;
height: 100px;
background-color:rgba(255,255,255,0.7);
border-radius: 10px;
text-align: center;
display: inline-block;
}
h1
{
color: white;
font-size: 60px;
}
p
{
color: black;
font-size: 30px;
margin: auto;
}
.price
{
color: #FE9A2E;
}
.reward:hover
{
opacity: 1;
}
.reward:hover .text_reward
{
display: none;
}
.reward:hover .name
{
font-size: 30px;
position: absolute;
margin-top: 300px;
}
.reward:hover h1
{
font-size: 30px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="gandalf.css">
<title>gandalf</title>
<meta charset="utf-8">
</head>
<body>
<section>
<div class="reward">
<div class="text_reward">
<p>reward <span class="price">1000</span> golden coins</p>
</div>
<div class="name">
<h1>Gandalf</h1>
</div>
</div>
</section>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment