Last active
April 17, 2020 01:35
-
-
Save pierrealexaline/d74112f4ecac56d65aea08b9cc9b4464 to your computer and use it in GitHub Desktop.
WCS - Integration - 2 Add 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; | |
display:flex; | |
flex-direction: row; | |
justify-content:center; | |
align-items:center; | |
} | |
.container{ text-align:center; | |
width:320px; | |
height:320px; | |
background:#fff; | |
} | |
.container:hover{ | |
cursor:pointer; | |
} | |
.container h4{ | |
font-size:36px; | |
z-index:999; | |
top:120px; | |
font-weight:300; | |
margin-left:50px; | |
position:absolute; | |
color:#fff; | |
opacity:1; | |
transition: .5s ease; | |
} | |
.container:hover h4{ | |
font-size:20px; | |
color:#fff; | |
top:200px; | |
margin-left:86px; | |
opacity:1; | |
} | |
.container img{ | |
width:220px; | |
opacity:0.8; | |
transition: .5s ease; | |
} | |
.container img:hover{ | |
opacity:1; | |
} | |
.container figcaption{ | |
font-size:20px; | |
position:absolute; | |
top:40px; | |
margin-left:30px; | |
padding:14px 30px; | |
background:#fff; | |
opacity:0.8; | |
border-radius:4px; | |
transition: 1s ease; | |
} | |
span{ | |
color:orange; | |
} | |
.container:hover figcaption{ | |
opacity:0; | |
} |
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" /> | |
<meta http-equiv="x-ua-compatible" content="ie=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<title>Wanted!</title> | |
<link rel="stylesheet" href="wcs_add_style_with_css.css" /> | |
</head> | |
<body> | |
<div class="container"> | |
<figure> | |
<h4>Gandalf</h4> | |
<img src="integration_gandalf.png" alt="The WIzard" title="the Wizard - Reward 1000 gold coins !"> | |
<figcaption> | |
Reward <span>1000</span><br> golden coins | |
</figcaption> | |
</figure> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment