--- url: "https://web.dev/articles/conic-gradient-border" titulek: "Use conic gradients to create a cool border | Articles | web.dev" h1: "Use conic gradients to create a cool border Stay organized with collections Save and categorize content based on your preferences." popis: "" jazyk: "en" kanonicka: "https://web.dev/articles/conic-gradient-border" drobecky: ["Articles", "Use conic gradients to create a cool border"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 00:05:32" znaku: 2075 slov: 236 kodovani: "iso-8859-2" sha256: "8f08074a677f6ad7455fa5af17dfed8538a471ea85f55878a57165e5662ac8d5" --- Use conic gradients to create a cool border Stay organized with collections Save and categorize content based on your preferences. Conic gradients can be used to create some interesting effects, such as this nice border example. This [CodePen](https://codepen.io/argyleink/pen/pogZxaZ) created by [Adam Argyle](/authors/adamargyle), originally shared via this [tweet](https://twitter.com/argyleink/status/1282889809782927360) on Twitter, shows how to use a [conic gradient](https://developer.mozilla.org/docs/Web/CSS/gradient/conic-gradient) to create a border. `.conic-gradient-border { border: 25px solid; border-image-slice: 1; border-image-source: conic-gradient( hsl(100 100% 60%), hsl(200 100% 60%), hsl(100 100% 60%) ); }` [Terry Mun](https://twitter.com/teddyrised) creatively [forked](https://twitter.com/teddyrised/status/1283326930717114370?s=20&t=S-qpKkaAetTCgPmQ6HNjxQ) Adam's codepen and created this [CodePen](https://codepen.io/terrymun/pen/mdVGjMB). 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. These examples uses the [`border-image-source`](https://developer.mozilla.org/docs/Web/CSS/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` Browser Support 15 12 15 6 [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/border-image-source) Conic gradient Except as otherwise noted, the content of this page is licensed under the [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/), and code samples are licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0). For details, see the [Google Developers Site Policies](https://developers.google.com/site-policies). Java is a registered trademark of Oracle and/or its affiliates. Last updated 2022-05-27 UTC.