Skip to content

Instantly share code, notes, and snippets.

@pysergent
Last active February 5, 2019 10:55
Show Gist options
  • Save pysergent/7b8c98a3b5be9199bbc034b24086884f to your computer and use it in GitHub Desktop.
Save pysergent/7b8c98a3b5be9199bbc034b24086884f to your computer and use it in GitHub Desktop.
body{
margin: 0px;
padding: 0px;
font-family: 'Source Sans Pro', sans-serif;
width: 500px;
height: 570px;
}
img{
opacity: 0.5;
}
#p1{
font-size: 50px;
color: black;
position: absolute;
top: -20px;
width: 270px;
left: 20px;
right: 50px;
padding: 10px 97px;
background-color: rgba(255,255,255, 0.7);
border-radius: 10px;
}
.nombre{
color:orange;
}
.name{
position: absolute;
top: 280px;
left: 90px;
font-size: 90px;
color: white;
letter-spacing: 2px;
}
.container:hover img{
opacity: 1;
}
.container:hover .text{
opacity: 0;
}
.container:hover .name{
opacity: 1;
animation: move 0.5s 1;
animation-fill-mode: forwards;
}
@keyframes move{
from{
top: 280px;
left: 90px;
}
to{
top: 480px;
left: 190px;
font-size: 30px;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="gandalf.css">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
<title>Gandalf</title>
</head>
<body>
<div class="container">
<img src="http://images.innoveduc.fr/integration_gandalf.png" alt="gandalf">
<div class="text">
<p id="p1">reward <span class="nombre">1000</span><br> golden coins</p>
</div>
<div class="name">Gandalf
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment