Last active
February 26, 2018 11:20
-
-
Save TheCodingLady/aacf493abaa27c60989d358630f96b67 to your computer and use it in GitHub Desktop.
Quête3-donne du style avec CSS
This file contains hidden or 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 lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<link rel="stylesheet" href="style.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> 1000 </span></>golden coins</p> | |
<p class="name">Gandalf</p> | |
</div> | |
</body> | |
</html> |
This file contains hidden or 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
/* For Gandalf Wanted poster */ | |
body | |
{ | |
background: white; | |
padding: 20px; | |
} | |
#Gandalf_portrait | |
{ | |
position: relative; | |
background: url('integration_gandalf.png') no-repeat; | |
height: 600px; | |
width: 500px; | |
} | |
img | |
{ | |
opacity: 0.5; | |
} | |
img:hover | |
{ | |
opacity: 1.0; | |
} | |
.reward | |
{ | |
position: absolute; | |
top: 0; | |
margin: 35px; | |
padding-left: 80px; | |
padding-right: 40px; | |
padding-top: 15px; | |
padding-bottom: 15px; | |
background-color: #e1e1e1; | |
opacity: 0.8; | |
border: none; | |
border-radius: 12px; | |
font: 3em arial, sans-serif; | |
color: black; | |
} | |
span | |
{ color: rgb(255, 165, 0); | |
font-weight: bold; | |
} | |
#Gandalf_portrait:hover | |
.reward | |
{ | |
display: none; | |
} | |
.name | |
{ | |
font: 5em times, serif; | |
top: 275px; | |
left: 100px; | |
text-align: center; | |
position: absolute; | |
margin: 0; | |
padding: 0; | |
color: white; | |
} | |
#Gandalf_portrait:hover | |
.name | |
{ | |
font: 2em times, serif; | |
margin-bottom: 20px; | |
position: absolute; | |
top: 500px; | |
left: 180px; | |
font-weight: bold; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment