Skip to content

Instantly share code, notes, and snippets.

@ValeryC
Last active February 27, 2018 13:08
Show Gist options
  • Save ValeryC/8114f5027ee4c0ec761d61cdc42b56cf to your computer and use it in GitHub Desktop.
Save ValeryC/8114f5027ee4c0ec761d61cdc42b56cf to your computer and use it in GitHub Desktop.
.image {
opacity: 0.7;
width: 100%;
height: auto;
}
.bloc {
transition: .5s ease;
opacity: 0.7;
position: absolute;
top: 50%;
left: 75%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
width: 90%;
}
.container:hover .legende {
opacity: 1;
position: absolute;
top: 150%;
left: 40%;
color: white;
font-size: 100px;
}
.container:hover .image {
opacity: 1;
}
.container:hover .bloc {
opacity: 0;
}
.text {
background-color: white;
font-size: 30px;
padding: 10% 100px;
border-radius: 10px;
position: absolute;
top: -150px;
}
.text span{color:orange}
.legende {
font-size: 150px;
text-align: center;
position: absolute;
top: 100%;
left: 30%;
color: white;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>FindThePrecious.com</title>
<link rel="stylesheet" type="text/css" href="findtheprecious.css">
</head>
<body>
<div class="container">
<img src="http://images.innoveduc.fr/integration_gandalf.png" class="image" alt="gandalf" height="200" width="200">
<div class="bloc">
<div class="text">Reward <span>1000</span> gold coins</div>
</div>
<div class="legende"> Gandalf </div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment