Last active
February 28, 2023 09:51
-
-
Save thevangelist/e414409396d38b17ef34799edfce8df6 to your computer and use it in GitHub Desktop.
Gradient bottom border to div in CSS
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
/** CSS **/ | |
.border-bottom { | |
border-bottom: 1px solid transparent; | |
border-image: linear-gradient(0.25turn, transparent, black, transparent); | |
border-image-slice: 1; | |
width: 100%; | |
} | |
/** HTML **/ | |
<div class="d-flex vh-100"> | |
<div class="m-auto"> | |
<div class="border-bottom"> | |
<h2>This is also that I like</h2> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment