Skip to content

Instantly share code, notes, and snippets.

@TheCodingLady
Last active February 22, 2018 20:01
Show Gist options
  • Save TheCodingLady/fd265aaddd460805835400adbb67ddd3 to your computer and use it in GitHub Desktop.
Save TheCodingLady/fd265aaddd460805835400adbb67ddd3 to your computer and use it in GitHub Desktop.
Quête - donne du style avec CSS
/* For Gandalf Wanted poster */
body
{
background: white;
padding: 20px;
}
#Gandalf_portrait
{
height: 40%;
position: relative;
}
img
{
opacity: 0.5;
}
img:hover
{
opacity: 1.0;
}
.reward
{
position: absolute;
margin: 20px;
padding: 20px;
background-color: rgba(192,192,192,0.5);
border: 1.5px black;
border-radius: 8px;
font: 3em arial, sans-serif;
color: black;
margin-top: 20px;
}
.amount
{ color: rgb(255, 165, 0);
font-weight: bold;
}
#Gandalf_portrait:hover
p .reward
{
display: none;
}
.name
{
font: 5em times, serif;
margin-top: 100px;
}
#Gandalf_portrait:hover
p .name
{
font: 2em times, serif;
margin-bottom: 20px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="WantedPosterStyle.css" />
<title>Fellows Wanted: GANDALF</title>
</head>
<body>
<div id="Gandalf_portrait">
<img src="http://images.innoveduc.fr/integration_gandalf.png" alt="Gandalf"/>
<p class="reward">reward<span class="amount"> 1000 </span>gold coins</p>
<p class="name">Gandalf</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment