This content originally appeared on web.dev and was authored by Google Developers
This CodePen created by Terry Mun shows how to use a conic gradient to create a border. Move your mouse over the element and you'll see the gradient change, thanks to a little bit of JavaScript updating a CSS custom property that stores the rotation angle.
The example uses the border-image-source
property. This property sets the source image used to create an element's border. As with other properties that accept an image value, any CSS gradient type is valid too.
border-image-source
#
Conic gradient #
This content originally appeared on web.dev and was authored by Google Developers
Google Developers | Sciencx (2022-05-27T00:00:00+00:00) Use conic gradients to create a cool border. Retrieved from https://www.scien.cx/2022/05/27/use-conic-gradients-to-create-a-cool-border/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.