Last active
February 4, 2023 00:34
-
-
Save NazCodeland/2e33cb8d21df3578836da4facd26e94c to your computer and use it in GitHub Desktop.
making a sharp corner effect in CSS using the ::before pseudo element
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
<!-- html code --> | |
<div></div> | |
/* css code */ | |
div { | |
position: relative; | |
height: 50vh;; | |
background-color: #64953D; | |
} | |
div::before { | |
content: ''; | |
position: absolute; | |
inset-block-start: 0; | |
inset-inline-start: 0; | |
border-block-start: 80px solid #6495ED; | |
border-inline-end: 80px solid #64953D; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment