Created
April 4, 2019 12:15
-
-
Save evadav/2b28dcc6db0dd6d4ad0a78ed688fd74d to your computer and use it in GitHub Desktop.
02 - Give style with 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
body { | |
font-family: Arial, Helvetica, sans-serif; | |
} | |
.gandalf{ | |
position:relative; | |
max-width: 500px; | |
height: 580px; | |
text-align: center; | |
background-image: url("imagenes/integration_gandalf.png"); | |
display: flex; | |
justify-content: space-around; | |
flex-direction: column; | |
} | |
.gandalf image{ | |
opacity: 0.5; | |
} | |
.gandalf:hover{ | |
opacity: 1; | |
justify-content: flex-end; | |
} | |
.gandalf:hover .reward { | |
display:none; | |
} | |
.reward{ | |
/*position: absolute; | |
top:10; | |
left:80;*/ | |
background-color:white; | |
opacity: 0.8; | |
padding-left:100; | |
padding-right:100; | |
color:black; | |
border-radius:10px; | |
font-weight:bold; | |
font-size:25px; | |
} | |
.span{ | |
color:orange ; | |
} | |
.name{ | |
color: white; | |
/*position: absolute; | |
top: 300px; | |
left:125px;*/ | |
font-size:50px; | |
} | |
.gandalf:hover .name{ | |
top:500px; | |
left:165px; | |
font-size: 20px; | |
} |
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> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="description" content="CSS quest Wild Code School"/> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" /> | |
<link rel="stylesheet" href="misEstilos.css" /> | |
<title>Gandalf</title> | |
</head> | |
<body> | |
<div class="gandalf"> | |
<div class="reward"> | |
<p>reward <span>1000 </span>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