<div className="number-circle">
<div className="number-circle__number">
75
</div>
</div>
.number-circle {
@include flex;
justify-content: center;
align-items: center;
width: 130px;
height: 130px;
border: 15px solid;
border-image: linear-gradient(to right, $orange 50%, $darkGrey 50%) 1;
border-radius: 50%;
&__number {
font-size: 40px;
}
}
<div class="div">75</div>
.div {
position: relative;
width: 100px;
height: 100px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 30px;
}
.div::before {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
border: 20px solid red;
border-color: red red green green;
border-radius: 100%;
transform: rotate(45deg);
pointer-events: none;
}
<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;
}