Created
April 29, 2014 11:48
-
-
Save juliabode/11397881 to your computer and use it in GitHub Desktop.
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
* { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
body { | |
background-color: #a3dae3; | |
padding: 0; | |
margin: 0; | |
} | |
.above { | |
height: 110px; | |
background: #1c4c55; | |
} | |
.diamond { | |
width: 256px; | |
height: 75px; | |
border-bottom: 60px solid #bee5eb; | |
border-left: 35px solid transparent; | |
border-right: 35px solid transparent; | |
margin: 0 auto; | |
position: relative; | |
padding-top: 50px; | |
-webkit-transition: all 0.15s ease-out; | |
-moz-transition: all 0.15s ease-out; | |
-o-transition: all 0.15s ease-out; | |
transition: all 0.15s ease-out; | |
-webkit-transform: translate(0px, -14px); | |
-moz-transform: translate(0px, -14px); | |
-ms-transform: translate(0px, -14px); | |
-o-transform: translate(0px, -14px); | |
transform: translate(0px, -14px); | |
} | |
.diamond:after { | |
border: solid transparent; | |
content: " "; | |
position: absolute; | |
pointer-events: none; | |
border-color: rgba(136,183,213,0); | |
border-top-color: #8fd2dd; | |
border-width: 128px; | |
left: -36px; | |
top: 110px; | |
} | |
.diamond:hover { | |
-webkit-transform: translate(0px, 0px); | |
-moz-transform: translate(0px, 0px); | |
-ms-transform: translate(0px, 0px); | |
-o-transform: translate(0px, 0px); | |
transform: translate(0px, 0px); | |
} |
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"> | |
<title>Diamond</title> | |
</head> | |
<body> | |
<div class="above"> | |
<div class="diamond"> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment