You need to divide by 2 every values involved, even the clip(); ones (fiddle updated)

#loading {
  width: 50px;
  height: 50px;
  margin: 30px auto;
  position: relative;
}
.outer-shadow,
.inner-shadow {
  z-index: 4;
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 100%;
  box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.5);
}
.inner-shadow {
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
  border-radius: 100%;
  background-color: #ffffff;
  box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.5);
}
.hold {
  position: absolute;
  width: 100%;
  height: 100%;
  clip: rect(0px, 50px, 50px, 25px);
  border-radius: 100%;
  background-color: #fff;
}
.fill,
.dot span {
  background-color: #f50;
}
.fill {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 100%;
  clip: rect(0px, 25px, 50px, 0px);
}
.left .fill {
  z-index: 1;
  -webkit-animation: left 1s linear;
  -moz-animation: left 1s linear;
  animation: left 1s linear both;
}
@keyframes left {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}
@-webkit-keyframes left {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(180deg);
  }
}
.right {
  z-index: 3;
  -webkit-transform: rotate(180deg);
  -moz-transform: rotate(180deg);
  transform: rotate(180deg);
}
.right .fill {
  z-index: 3;
  -webkit-animation: right 1s linear;
  -moz-animation: right 1s linear;
  animation: right 1s linear both;
  -webkit-animation-delay: 1s;
  -moz-animation-delay: 1s;
  animation-delay: 1s;
}
@keyframes right {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}
@-webkit-keyframes right {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}
.inner-shadow img {
  margin-left: 8px;
  margin-top: 7px;
}
<div id='loading'>
  <div class='outer-shadow'>
  </div>
  <div class='inner-shadow'>
  </div>
  <div class='hold left'>
    <div class='fill'></div>
  </div>
  <div class='hold right'>
    <div class='fill'></div>
  </div>

</div>

edit: in respond to comment @Filipe

How would the change from clip to clip-path be? I tried (also changing rect to inset), but the animation stops working.

Possible example with clip-path instead clip .

#loading {
  width: 50px;
  height: 50px;
  margin: 30px auto;
  position: relative;
}

.outer-shadow,
.inner-shadow {
  z-index: 4;
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 100%;
  box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.inner-shadow {
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
  border-radius: 100%;
  background-color: #ffffff;
  box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.hold {
  position: absolute;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0, 0 0, 0 100%, 50% 100%);
  border-radius: 100%;
  background-color: #fff;
}

.fill,
.dot span {
  background-color: #f50;
}

.fill {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 100%;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.left .fill {
  z-index: 1;
  -webkit-animation: left 1s linear;
  -moz-animation: left 1s linear;
  animation: left 1s linear both;
}

@keyframes left {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}

@-webkit-keyframes left {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(180deg);
  }
}

.right {
  z-index: 3;
  -webkit-transform: rotate(180deg);
  -moz-transform: rotate(180deg);
  transform: rotate(180deg);
}

.right .fill {
  z-index: 3;
  -webkit-animation: right 1s linear;
  -moz-animation: right 1s linear;
  animation: right 1s linear both;
  -webkit-animation-delay: 1s;
  -moz-animation-delay: 1s;
  animation-delay: 1s;
}

@keyframes right {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}

@-webkit-keyframes right {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}

.inner-shadow img {
  margin-left: 8px;
  margin-top: 7px;
}
<div id='loading'>
  <div class='outer-shadow'>
  </div>
  <div class='inner-shadow'>
  </div>
  <div class='hold left'>
    <div class='fill'></div>
  </div>
  <div class='hold right'>
    <div class='fill'></div>
  </div>
</div>

Answer from G-Cyrillus on Stack Overflow
Top answer
1 of 2
11

You need to divide by 2 every values involved, even the clip(); ones (fiddle updated)

#loading {
  width: 50px;
  height: 50px;
  margin: 30px auto;
  position: relative;
}
.outer-shadow,
.inner-shadow {
  z-index: 4;
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 100%;
  box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.5);
}
.inner-shadow {
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
  border-radius: 100%;
  background-color: #ffffff;
  box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.5);
}
.hold {
  position: absolute;
  width: 100%;
  height: 100%;
  clip: rect(0px, 50px, 50px, 25px);
  border-radius: 100%;
  background-color: #fff;
}
.fill,
.dot span {
  background-color: #f50;
}
.fill {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 100%;
  clip: rect(0px, 25px, 50px, 0px);
}
.left .fill {
  z-index: 1;
  -webkit-animation: left 1s linear;
  -moz-animation: left 1s linear;
  animation: left 1s linear both;
}
@keyframes left {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}
@-webkit-keyframes left {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(180deg);
  }
}
.right {
  z-index: 3;
  -webkit-transform: rotate(180deg);
  -moz-transform: rotate(180deg);
  transform: rotate(180deg);
}
.right .fill {
  z-index: 3;
  -webkit-animation: right 1s linear;
  -moz-animation: right 1s linear;
  animation: right 1s linear both;
  -webkit-animation-delay: 1s;
  -moz-animation-delay: 1s;
  animation-delay: 1s;
}
@keyframes right {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}
@-webkit-keyframes right {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}
.inner-shadow img {
  margin-left: 8px;
  margin-top: 7px;
}
<div id='loading'>
  <div class='outer-shadow'>
  </div>
  <div class='inner-shadow'>
  </div>
  <div class='hold left'>
    <div class='fill'></div>
  </div>
  <div class='hold right'>
    <div class='fill'></div>
  </div>

</div>

edit: in respond to comment @Filipe

How would the change from clip to clip-path be? I tried (also changing rect to inset), but the animation stops working.

Possible example with clip-path instead clip .

#loading {
  width: 50px;
  height: 50px;
  margin: 30px auto;
  position: relative;
}

.outer-shadow,
.inner-shadow {
  z-index: 4;
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 100%;
  box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.inner-shadow {
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
  border-radius: 100%;
  background-color: #ffffff;
  box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.hold {
  position: absolute;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0, 0 0, 0 100%, 50% 100%);
  border-radius: 100%;
  background-color: #fff;
}

.fill,
.dot span {
  background-color: #f50;
}

.fill {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 100%;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.left .fill {
  z-index: 1;
  -webkit-animation: left 1s linear;
  -moz-animation: left 1s linear;
  animation: left 1s linear both;
}

@keyframes left {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}

@-webkit-keyframes left {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(180deg);
  }
}

.right {
  z-index: 3;
  -webkit-transform: rotate(180deg);
  -moz-transform: rotate(180deg);
  transform: rotate(180deg);
}

.right .fill {
  z-index: 3;
  -webkit-animation: right 1s linear;
  -moz-animation: right 1s linear;
  animation: right 1s linear both;
  -webkit-animation-delay: 1s;
  -moz-animation-delay: 1s;
  animation-delay: 1s;
}

@keyframes right {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}

@-webkit-keyframes right {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}

.inner-shadow img {
  margin-left: 8px;
  margin-top: 7px;
}
<div id='loading'>
  <div class='outer-shadow'>
  </div>
  <div class='inner-shadow'>
  </div>
  <div class='hold left'>
    <div class='fill'></div>
  </div>
  <div class='hold right'>
    <div class='fill'></div>
  </div>
</div>

2 of 2
0

is this what you expect,hope this will help to you.try this.I only concerned about the circle size of 50 px with inside circle.if this is not the case tell me.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jquery</title>

<style type="text/css">
  div.circleone{
    width: 50px;
    height: 50px;
    border-radius: 25px;
    box-shadow: 1px 2px 1px black;

  }

  div.circletwo
  {
    width: 25px;
    height: 25px;
    border-radius: 12.5px;
    box-shadow: 1px -1px 1px black;
    position: relative;
    top: 25%;
    left: 25%;


  }

</style>

</head>

<body>

<div class="circleone">
  <div class="circletwo"></div>
</div>



</body>
</html>

🌐
SitePoint
sitepoint.com › html & css
Animating circular image border - HTML & CSS - SitePoint Forums | Web Development & Design Community
June 21, 2021 - One half circle hides the other one until a half animation is complete and then the other half is animated to complete the circle. There is no border as such but a solid background which is hidden by the inner elements to just allow the edge of the circles to be seen.
Discussions

animation - CSS animate circle border filling with color - Stack Overflow
I'm new to learning about CSS animations. I have a circle with an arc going around it, but I want to make it leave a trail behind. The idea is I'd use this to visually show how many credits somebod... More on stackoverflow.com
🌐 stackoverflow.com
css - How to animate circle from the middle towards a stroke - Stack Overflow
I would like to achieve the following animation with CSS: From the center the circle scales to 100%, so the entire circle is filled with a color Then again from the center the fill deformed into a More on stackoverflow.com
🌐 stackoverflow.com
html - CSS ONLY Animate Draw Circle with border-radius and transparent background - Stack Overflow
I am trying to draw a circle with border-radius, and animate it. I can do this, but what i can't do is overlay elements and set the circles background to transparent, without unhiding the mask. I a... More on stackoverflow.com
🌐 stackoverflow.com
Circle fill in on hover
So if I have: And on hover, I want it to fill in whole border starting from bottom to up, until it touches right, making a full circle. But, I don’t have that transition effect, nor was I able to make it a circle with just 50% of the bottom and right border (as I don’t know how to make ... More on sitepoint.com
🌐 sitepoint.com
1
0
July 26, 2024
🌐
JSFiddle
jsfiddle.net › PatTastic › nzf0m83j
Animate Circle Border - JSFiddle - Code Playground
Our CSS Flexbox generator lets you create a layout, and skip knowing the confusing properties and value names (let's be honest the W3C did not make a good job here).
Top answer
1 of 1
15

There is a very easy to follow, informative and detailed tutorial on exactly how to achieve this (and more) by Anders Ingemann, which can be found here.

Its a fairly complex operation- so I'll simply distil the final stage from the tutorial here

Demo Fiddle

HTML

<div class="radial-progress">
    <div class="circle">
        <div class="mask full">
            <div class="fill"></div>
        </div>
        <div class="mask half">
            <div class="fill"></div>
            <div class="fill fix"></div>
        </div>
        <div class="shadow"></div>
    </div>
    <div class="inset"></div>
</div>

CSS/LESS

.radial-progress {
    @circle-size: 120px;
    @circle-background: #d6dadc;
    @circle-color: #97a71d;
    @inset-size: 90px;
    @inset-color: #fbfbfb;
    @transition-length: 1s;
    @shadow: 6px 6px 10px rgba(0, 0, 0, 0.2);
    margin: 50px;
    width: @circle-size;
    height: @circle-size;
    background-color: @circle-background;
    border-radius: 50%;
    .circle {
        .mask, .fill, .shadow {
            width: @circle-size;
            height: @circle-size;
            position: absolute;
            border-radius: 50%;
        }
        .shadow {
            box-shadow: @shadow inset;
        }
        .mask, .fill {
            -webkit-backface-visibility: hidden;
            transition: -webkit-transform @transition-length;
            transition: -ms-transform @transition-length;
            transition: transform @transition-length;
        }
        .mask {
            clip: rect(0px, @circle-size, @circle-size, @circle-size/2);
            .fill {
                clip: rect(0px, @circle-size/2, @circle-size, 0px);
                background-color: @circle-color;
            }
        }
    }
    .inset {
        width: @inset-size;
        height: @inset-size;
        position: absolute;
        margin-left: (@circle-size - @inset-size)/2;
        margin-top: (@circle-size - @inset-size)/2;
        background-color: @inset-color;
        border-radius: 50%;
        box-shadow: @shadow;
    }
}

Example jQuery (could be substituted with CSS)

$('head style[type="text/css"]').attr('type', 'text/less');
less.refreshStyles();
var transform_styles = ['-webkit-transform', '-ms-transform', 'transform'];
window.randomize = function () {
    var rotation = Math.floor(Math.random() * 180);
    var fill_rotation = rotation;
    var fix_rotation = rotation * 2;
    for (i in transform_styles) {
        $('.circle .fill, .circle .mask.full').css(transform_styles[i], 'rotate(' + fill_rotation + 'deg)');
        $('.circle .fill.fix').css(transform_styles[i], 'rotate(' + fix_rotation + 'deg)');
    }
}
setTimeout(window.randomize, 200);
$('.radial-progress').click(window.randomize);
🌐
CodePen
codepen.io › kbeherec › pen › EEZYqv
Circle Fill Animation
<div id='loading'> <div class='hold left'> <div class='fill'></div> </div> <div class='hold right'> <div class='fill'></div> </div> </div> ! CSS Options · Format CSS · View Compiled CSS · Analyze CSS · Maximize CSS Editor · Minimize CSS Editor · Fold All · Unfold All · #loading { width: 50px; height: 50px; margin: 30px auto; position: relative; } .outer-shadow, .inner-shadow { z-index: 4; position: absolute; width: 100%; height: 100%; border-radius: 100%; box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.5); } .inner-shadow { top: 50%; left: 50%; width: 40px; height: 40px; margin-left: -20px
🌐
CodePen
codepen.io › katmai7 › pen › npRRQP
Border animation (circle)
Minimize CSS Editor · Fold All · Unfold All · html{ height: 100%; } body{ height: 100%; background: #E94E3D; } .wrap{ margin: 100px auto; width: 130px; } @color: #E94E3D; .circle{ position: relative; overflow: hidden; width: 120px; height: 120px; border-radius: 50%; background: #E94E3D; box-shadow: 60px -60px 0 2px @color, -60px -60px 0 2px @color, -60px 60px 0 2px @color, 60px 60px 0 2px @color, 0 0 0 2px #E94E3D; .icon{ position: absolute; display: block; color: #fff; font-size: 20px; } .i1{ top: -25px; left: 55px; } .i2{ top: 50px; left: -20px; } .i3{ bottom: -25px; left: 50px; } .i4{ to
🌐
Smashing Magazine
smashingmagazine.com › 2023 › 10 › animate-along-path-css
How To Animate Along A Path In CSS — Smashing Magazine
October 18, 2023 - .progress-circle { width: 200px; aspect-ratio: 1; border-radius: 50%; } That’s our shape! We won’t see anything yet, of course, because we haven’t filled it in with color. Let’s do that now with a conic-gradient.
Find elsewhere
🌐
Slider Revolution
sliderrevolution.com › home › awesome css border animation examples to use
Awesome CSS Border Animation Examples to Use in Your Websites
January 27, 2026 - Jessica Aiskel’s fancy border animation demonstrates how creative use of the border-radius property can create unique container shapes that stand out from conventional rectangles and circles. This technique uses multiple radius values to create complex curves that add visual interest to containers and buttons. The resulting shapes create distinctive visual elements that reinforce brand identity and improve recognition. ... Michelle Barker’s Chrome-specific animation leverages the CSS Houdini API to create advanced gradient effects beyond standard CSS capabilities.
🌐
AVADA Commerce
blog.avada.io › css › border-animations
35+ Best Shopify CSS Border Animations Themes Free & Premium 2026 &#8211; AVADA Commerce Blog
March 14, 2022 - This stunning border is an ideal choice for you to be satisfied. With Mix-blend-mode: luminosity & Animating border-radius on CSS, you can view your website in an outstanding and eye-catching look. It has plenty of purple circles which are in different sizes but mixed perfectly.
🌐
Codeconvey
codeconvey.com › home › pure css percentage circle with animation
Pure CSS Percentage Circle With Animation | Fill Circle Border
August 28, 2023 - .circle-wrap .circle .mask, .circle-wrap .circle .fill { width: 150px; height: 150px; position: absolute; border-radius: 50%; } For the mask, we are going to use clip CSS property and set recent values.
🌐
Medium
tech.busuu.com › how-to-control-border-dashes-animation-with-css-and-svg-11cac82f0751
How to control border dashes animation with CSS and SVG | by Liem PHAM | Busuu Tech
December 15, 2016 - CSS code: .circle__spin circle { stroke-width: 5; /* control the dashes width */ stroke-dasharray: 120, 20; /* control the dashes spacing */ fill: none; stroke: orange; } Note that the circle radius is calculated this way: circle radius= ((circle height) +(2*stroke-width ) +(desired border to circle spacing)) / 2 67px = ((120px) + (2*5px)+ (4px)) / 2 · And finally you can add the animation.
Top answer
1 of 1
60

This is my solution.

I set a background on body to show it is transparent

body {
  background: repeating-linear-gradient(45deg, white 0px, lightblue 100px);
  height: 500px;
  background-size: 500px 500px;
  background-repeat: no-repeat;
}

html {
  height: 100%;
}

#container {
  position: absolute;
  width: 400px;
  height: 400px;
   border: solid red 1px;
   animation: colors 4s infinite;
}

#halfclip {
  width: 50%;
  height: 100%;
  right: 0px;
  position: absolute;
   overflow: hidden;
   transform-origin: left center;
   animation: cliprotate 16s steps(2) infinite;
   -webkit-animation: cliprotate 16s steps(2) infinite;
}

.halfcircle {
  box-sizing: border-box;
  height: 100%;
  right: 0px;
  position: absolute;
  border: solid 25px transparent;
   border-top-color: blue;
   border-left-color: blue;
   border-radius: 50%;
}
#clipped {
  width: 200%;
   animation: rotate 8s linear infinite;
   -webkit-animation: rotate 8s linear infinite;
}
#fixed {
  width: 100%;
    transform: rotate(135deg);  
   animation: showfixed 16s steps(2) infinite;
   -webkit-animation: showfixed 16s linear infinite;
}

@-webkit-keyframes cliprotate {
  0% {transform: rotate(0deg);}
  100% {transform: rotate(360deg);}
}

@keyframes cliprotate {
  0% {transform: rotate(0deg);}
  100% {transform: rotate(360deg);}
}


@-webkit-keyframes rotate {
  0% {transform: rotate(-45deg);}
  100% {transform: rotate(135deg);}
}

@keyframes rotate {
  0% {transform: rotate(-45deg);}
  100% {transform: rotate(135deg);}
}

@-webkit-keyframes showfixed {
  0% {opacity: 0;}
  49.9% {opacity: 0;}
  50% {opacity: 1;}
 100% {opacity: 1;}
}
<div id="container">
    <div id="halfclip">
        <div class="halfcircle" id="clipped">
        </div>
    </div>
    <div class="halfcircle" id="fixed">
    </div>
</div>

And this is a variation on the solution, to make it run only once on hover

body {
  background: repeating-linear-gradient(45deg, white 0px, lightblue 100px);
  height: 500px;
  background-size: 500px 500px;
  background-repeat: no-repeat;
}

html {
  height: 100%;
}

#container {
  position: absolute;
  width: 300px;
  height: 300px;
   border: solid red 1px;
}

#halfclip {
    width: 50%;
    height: 100%;
    right: 0px;
    position: absolute;
    overflow: hidden;
    transform-origin: left center;
}

#container:hover #halfclip {
    animation: cliprotate 6s 1;
    transform: rotate(180deg);
} 

@keyframes cliprotate {
  0% {transform: rotate(0deg);}
  50% {transform: rotate(0deg);}
  50.01% {transform: rotate(180deg);}
  100% {transform: rotate(180deg);}
}

.halfcircle {
  box-sizing: border-box;
  height: 100%;
  right: 0px;
  position: absolute;
  border: solid 25px transparent;
   border-top-color: blue;
   border-left-color: blue;
   border-radius: 50%;
}

#clipped {
    width: 200%;
    transform: rotate(-45deg);
}
#container:hover #clipped {
    transform: rotate(135deg);
    animation: rotate 3s linear 2;
}


@keyframes rotate {
  0% {transform: rotate(-45deg);}
  100% {transform: rotate(135deg);}
}


#fixed {
  width: 100%;
    transform: rotate(135deg);  
    opacity: 0;
}

#container:hover #fixed {
    opacity: 1;
    animation: showfixed 6s 1;
}



@keyframes showfixed {
  0% {opacity: 0;}
  49.99% {opacity: 0;}
  50% {opacity: 1;}
 100% {opacity: 1;}
}
<div id="container">
    <div id="halfclip">
        <div class="halfcircle" id="clipped">
        </div>
    </div>
    <div class="halfcircle" id="fixed">
    </div>
</div>

🌐
CodePen
codepen.io › OlegJR › pen › bGpxMvr
SVG circle border animation
<svg height="200" width="200"> <circle class="circle" cx="100" cy="100" r="95" stroke="#231f20" stroke-width="10" fill-opacity="0" /> </svg> <div class="logo"></div> ... body { height: 100vh; position: relative; background-color: #f5f5f5; } svg, .logo { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); } .logo { width: 140px; height: 140px; border-radius: 100px; opacity: 0; animation: fadeIn 0.75s linear forwards; animation-delay: 1s; } .circle { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: stroke 2s ease-out forwards; } @keyframes stroke { to { stroke-dashoffset: 0; } } @keyframes fadeIn { to { opacity: 1; } }
🌐
YouTube
youtube.com › watch
Rotating Circle Border Animation on Hover with CSS - YouTube
Learn how to add rotating circle border animation to an element's hover with pure CSS. Tutorial by Winterwind.comwww.winterwind.comSource Code:https://www.wi...
Published   April 26, 2023
🌐
Stackfindover
blog.stackfindover.com › home › css border animation [ 25+ best css border effect examples]
CSS Border Animation [ 25+ Best CSS Border Effect Examples]
September 19, 2021 - Border animation using clip path, which was developed by kang. Moreover, you can customize it according to your wish and need. CSS circle border fill animation, which was developed by katmai7.
🌐
TutorialsPoint
tutorialspoint.com › article › CSS-only-Animate-Draw-Circle-with-border-radius-and-transparent-background
CSS only Animate - Draw Circle with border-radius and transparent background
June 25, 2020 - body { background: repeating-linear-gradient(45deg, white 0px, green 100px); height: 400px; background-size: 400px 400px; background-repeat: no-repeat; } html { height: 100%; } #box { position: absolute; width: 400px; height: 400px; border: solid blue 2px; animation: colors 5s infinite; } #demo { width: 50%; height: 100%; right: 0px; position: absolute; overflow: hidden; transform-origin: left center; animation: cliprotate 18s steps(2) infinite; -webkit-animation: cliprotate 18s steps(2) infinite; } .circlehalf { box-sizing: border-box; height: 100%; right: 0px; position: absolute; border: sol
🌐
Winterwind
winterwind.com › tutorials › css › 53
Rotating Circle Border Animation
body { background-color: #2E3537; height: 100vh; display: flex; align-items: center; justify-content: center; gap: 50px; font-family: 'Arial', sans-serif; } button { background-color: transparent; border: 0; } a { text-decoration: none; } .border { width: 90px; height: 90px; line-height: 90px; font-size: 45px; text-align: center; color: white; position: relative; box-shadow: 0 0 0 5px white; border-radius: 50%; } .border:after { content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%; top: -4px; left: -4px; border: 4px dashed white; z-index: 1; } .border:hover { box-shadow: 0 0 0 0 transparent; transition: box-shadow 0.2s; } .border:hover:after { animation: spin 10s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }