Last active
December 1, 2024 15:09
-
-
Save stereokai/36dc0095b9d24ce93b045e2ddc60d7a0 to your computer and use it in GitHub Desktop.
CSS rounded corners with gradient border
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
.rounded-corners-gradient-borders { | |
width: 300px; | |
height: 80px; | |
border: double 4px transparent; | |
border-radius: 80px; | |
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff); | |
background-origin: border-box; | |
background-clip: padding-box, border-box; | |
} |
Thank you!! saved my day
good job!
Nice, here's another one that helped me too. https://dev.to/afif/border-with-gradient-and-radius-387f
@elitedevstudios
Thank you so much! This is the only example I found where the inner background can be transparent (using a mask-image
). Exactly what I need :)
Nice, here's another one that helped me too. https://dev.to/afif/border-with-gradient-and-radius-387f
@elitedevstudios
This article has been very helpful to me, thanks a bunch!
Thank you! So much!
Nice, here's another one that helped me too. https://dev.to/afif/border-with-gradient-and-radius-387f
The "mask" is not supported in all browsers
nice
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the help