Created
July 17, 2017 05:21
-
-
Save noahub/783cf6bc402bf4cc99cb84aa8927c8f8 to your computer and use it in GitHub Desktop.
Angled Page Sections
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
<style> | |
/*This ensures diagonal bg doesn't block page content*/ | |
.lp-positioned-content{ | |
z-index: 100; | |
} | |
/*Replace #lp-pom-block-34 with your section ID to create an angled bottom*/ | |
#lp-pom-block-34:after{ | |
background: inherit; | |
bottom: 0; | |
content: ''; | |
display: block; | |
height: 50%; | |
left: 0; | |
position: absolute; | |
right: 0; | |
transform: skewY(-3.75deg); /*change to increase/decrease angle*/ | |
transform-origin: 100%; | |
z-index: 1; | |
} | |
/*Replace #lp-pom-block-34 with your section ID to create an angled top*/ | |
#lp-pom-block-34:before{ | |
background: inherit; | |
top: 0; | |
content: ''; | |
display: block; | |
height: 50%; | |
left: 0; | |
position: absolute; | |
right: 0; | |
transform: skewY(-3.75deg); /*change to increase/decrease angle*/ | |
transform-origin: 0; | |
z-index: 1; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment