2

I have this loader here: https://jsfiddle.net/guanzo/hdn3wqmd/2/

I'm trying to make it look like this

enter image description here

I'm not sure this can be done with borders alone, i've tried a bunch of variations of border width/radius etc, but it never comes out right.

.loader {
    border-top: 40px solid #3498db; /* Blue */
    border-bottom: 40px solid darkblue; /* Blue */
    border-radius: 50%;
    width: 300px;
    height: 300px;
}

EDIT: I'm not asking about making it spin. I'm asking how to create my provided image above with css. You'll notice that a Yin Yang's shape fills a circle. My desired shape does not, and has an empty center.

Eric Guan
  • 15,474
  • 8
  • 50
  • 61

1 Answers1

0

Is it Okay..

* {
  box-sizing:border-box;

}
div{
  
display:inline-block;
}
.loader {
    border-top: 40px solid #3498db; /* Blue */
    border-bottom: 40px solid darkblue; /* Blue */
     border-radius:75% 25% 75%;
     width: 200px;
     height: 200px;
     transform: rotate(35deg);
     margin-left:25%;
}
<div class="wrap">
<div class="loader"></div>
</div>

Or You can try some more adjustments here

Shivkumar kondi
  • 6,458
  • 9
  • 31
  • 58