You can just take a pseudo element ::after to create the open part, with just overlapping the circle element. Advantage is, that the open part can be as long as wished (not limited to a 3/4 full circle).
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;
}
}
Another approach that I came across, while not nearly as elegant as the previous approaches does appear to achieve your desired effect. In involves the use of several animations as well as showing/hiding different sections of the circle as necessary.
The code snippet contains an example demonstrating it.
Taking advantage of SVG is probably the best way to address this problem, as it's explicitly designed to handle drawing within the browser. I'd highly recommend that approach if SVG support is available.
Dylan's response details what this implementation might look like.
for the pseudo version, you can also use
linear-gradient
(shade can be decreased or increased) andbackground-clip
,where it is avalaible,
mix-blend-mode
can make it translucide,currentcolor
andanimation
can also be used to animate color :http://codepen.io/gc-nomade/pen/YNbmGE
You can just take a pseudo element
::after
to create the open part, with just overlapping the circle element. Advantage is, that the open part can be as long as wished (not limited to a 3/4 full circle).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.Static Image
A simplified example that just relies on a single HTML element and CSS class might look like this :
Example
Rotating Image
You can apply a basic rotation to the previous static example by taking advantage of CSS-based animations using
@keyframes
:Example
Drawing (without SVG)
Another approach that I came across, while not nearly as elegant as the previous approaches does appear to achieve your desired effect. In involves the use of several animations as well as showing/hiding different sections of the circle as necessary.
The code snippet contains an example demonstrating it.
Example
Drawing (with SVG)
Taking advantage of SVG is probably the best way to address this problem, as it's explicitly designed to handle drawing within the browser. I'd highly recommend that approach if SVG support is available.
Dylan's response details what this implementation might look like.