Last active
April 21, 2022 18:46
-
-
Save askdesign/4799e6e029722f359e696372e62ab3ca to your computer and use it in GitHub Desktop.
FEBRUARY 25, 2022 by Temani Afif
https://www.freecodecamp.org/news/section-divider-using-css
https://css-generators.com/section-divider/
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
/* --- Arrow in middle: top size is 150px, with 10px gap betwween top and bottom --- */ | |
.top { | |
clip-path: polygon(0 0,100% 0,100% calc(100% - 150px),calc(50% + 150.00px) calc(100% - 150px),50% 100%,calc(50% - 150.00px) calc(100% - 150px),0 calc(100% - 150px)); | |
} | |
.bottom { | |
clip-path: polygon(0 0,calc(50% - 4.14px - 150.00px) 0,50% calc(150px + 4.14px),calc(50% + 4.14px + 150.00px) 0,100% 0,100% 100%,0 100%); | |
margin-top: -140px; | |
} |
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
/* --- Full-width Arrow: top size is 150px, with 10px gap betwween top and bottom --- */ | |
.top { | |
clip-path: polygon(0 0,100% 0,100% calc(100% - 150px),50% 100%,0 calc(100% - 150px)); | |
} | |
.bottom { | |
clip-path: polygon(0 0,50% 150px,100% 0,100% 100%,0 100%); | |
margin-top: -140px; | |
} |
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
/* --- Slanted: top size is 150px, with 10px gap betwween top and bottom --- */ | |
.top { | |
clip-path: polygon(0 0,100% 0,100% 100%,0 calc(100% - 150px)); | |
} | |
.bottom { | |
clip-path: polygon(0 0,100% 150px,100% 100%,0 100%); | |
margin-top: -140px; | |
} |
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
/* --- Straight across, with 10px gap betwween top and bottom --- */ | |
.top { | |
clip-path: polygon(0 0,100% 0,100% calc(100% - 0px),0 100%); | |
} | |
.bottom { | |
clip-path: polygon(0 0px,100% 0,100% 100%,0 100%); | |
margin-top: 10px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment