Created
June 24, 2017 11:53
-
-
Save patrixd/a528eafe12b2d30b44de9629fbfa51aa to your computer and use it in GitHub Desktop.
Playing with skew transformation
This file contains 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
/** | |
* Playing with skew transformation */ | |
.paralelogram { | |
color: hsl(359, 50%, 33%); | |
font-family: calibri, verdana; | |
position: relative; | |
padding: 0.5em 1.3em; | |
font-variant: small-caps; | |
margin: 0 1em; | |
width: 20%; | |
} | |
.paralelogram:before { | |
content: ""; | |
position: absolute; | |
z-index: -1; | |
right: 0; | |
left: 0; | |
top: 0; | |
bottom: 0; | |
background: hsl(359, 50%, 33%); | |
transform: skew(-45deg); | |
} | |
.paralelogram:after { | |
content: ""; | |
position: absolute; | |
z-index: -1; | |
right: .8em; | |
left: .8em; | |
top: .5em; | |
bottom: .5em; | |
background: hsla(359, 50%, 85%, .8); | |
transform: skew(-45deg); | |
} |
This file contains 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
<div class="paralelogram">Sometitle here</div> |
This file contains 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
// alert('Hello world!'); |
This file contains 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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment