I'm trying to create a circle with bars inside that accompanies the edge of the circle, I'm hours breaking head with it.
Here is the code I took all day to do, but it's still not that,
$(function(){
var left = 50,
rotate = 0,
top = 0,
tX = 0,
tY = 100;
for (var i = 0; i <= 32; i++) {
var li = $('<li>',{class:'bar_'+i});
li.css({
'left': left+'%',
'top': '0',
'transform': "translateY(-"+tY+"%) translateX("+tX+"px) rotate("+rotate+"deg)",
'margin-top':top
});
top += 5.46875;
rotate += 2.8125;
left += 1.5625;
tX += 1.5625;
tY -= 1.5625;
$('.circle').append(li);
}
})
ul.circle { width: 310px; height: 350px; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #aaa;
border-radius: 100%; }
ul.circle li { position: absolute; width: 3px; height: 100px; background-color: #60f; list-style: none; box-sizing: border-box;
border: none; margin-left: -1.5px; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><ulclass="circle">
</ul>
I want the purple bar to follow the edge of the circle ... I've tried everything, I even thought of doing everything in the css, but I'm going to use 128 bars of that, so stylize 128 bars n goes right kkk, I'm waiting, hug!