I’m trying to create this line. And actually I did. I’m just wondering is there a better way to achieve this effect? Thank you in advance.
Here is my current code.
.blue-line-1 {
position: relative;
margin: 250px auto 0;
width: 222px;
height: 24px;
transform: rotate(90deg);
flex-shrink: 0;
border-radius: 2.375rem;
background: linear-gradient(135deg, #61AAFF 0%, #32EBCA 100%);
}
.blue-line-2 {
position: relative;
margin: 150px auto 0;
width: 80px;
height: 24px;
transform: rotate(90deg);
flex-shrink: 0;
border-radius: 2.375rem;
background: linear-gradient(135deg, #61AAFF 0%, #32EBCA 100%);
}
.blue-line-3 {
position: relative;
margin: 50px auto 50px;
width: 30px;
height: 24px;
transform: rotate(90deg);
flex-shrink: 0;
border-radius: 2.375rem;
background: linear-gradient(135deg, #61AAFF 0%, #32EBCA 100%);
}
<div>
<div class="blue-line-1">
</div>
<div class="blue-line-2">
</div>
<div class="blue-line-3">
</div>
</div>
2
Answers
One element can do it:
Here is a better and easier way!