I have this user interface requirement 
I currently have a working div solution (with a fixed height and width and background image for an external gradient border) and a pseudo-element located absolute with a background image of the inner border.
.div { position: relative; width: 254px; height: 254px; border: 2px solid transparent; border-radius: 50%; background: url(../img/gradient_border_circle.png) no-repeat 50%; } div:before { content: ""; position: absolute; top: 50%; transform: translate(-50%,-50%); left: 50%; width: 98px; height: 98px; border-radius: 50%; background: url(../img/gradient_border_circle_inner.png) no-repeat 50%; }
However, I am looking for a more elegant solution (pure CSS or svg gradient?) Without the use of background images, where the gradient can scale without pixelation.
I researched and closer than I met, https://codepen.io/nordstromdesign/pen/QNrBRM and Can I use the -radius border with a border image with a gradient? But I need a solution where the center is transparent to show through the background of the page
Update: ideally, I am looking for a solution with relatively good support in all modern browsers.
css ui-design radial-gradients
user1275105
source share