To create a circle that gradually draws it's outer path, use SVG.
SVG's stroke-dasharray
property will turn any path into a dashed line, which you can use to your advantage by setting the dash size to be almost as long as the path itself.
Then use a CSS animation to gradually change the stroke-dashoffset
to move the dash around the perimeter of your circle.
circle {
fill: white;
stroke: black;
stroke-width: 2;
stroke-dasharray: 250;
stroke-dashoffset: 1000;
animation: rotate 5s linear infinite;
}
@keyframes rotate {
to {
stroke-dashoffset: 0;
}
}
<svg height="100" width="100">
<circle cx="50" cy="50" r="40" />
</svg>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…