<div class="box"></div>
.box {
position: relative;
width: 150px;
height: 150px;
border-radius: 50%;
}
.box::before {
--border-width: 10px; /*Ширина границы*/
content: '';
position: absolute;
inset: calc(0px - var(--border-width));
z-index: -1;
/*
если нет поддержки inset:
top: var(--border-width);
left: var(--border-width);
right: var(--border-width);
bottom: var(--border-width);
*/
padding: var(--border-width);
border-radius: inherit;
background: linear-gradient(45deg, yellowgreen, orangered);
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
}