Master Invictus

Free · For developers and streamers · CSS loaders

Free Pure CSS Spinner Loader: Stretching Arc

A free pure CSS loader: arc that stretches and shrinks as it turns. One HTML tag and one stylesheet, no images and no JavaScript. It takes the text colour and sizes with one variable.

Download the CSS (1 KB)Download the animated SVG (1 KB)

  • Pure CSS, no images, fonts or JavaScript
  • Takes the text colour (currentColor)
  • Sized with one variable, --ll-size (48px by default)
  • One loop lasts 1.4 seconds
  • Also comes as an animated SVG that moves the same way

Add the stylesheet, paste the HTML where the loader should show, then set its size and colour: .ll-arc-stretch { --ll-size: 32px; color: #2b7cff; }

The HTML

<span class="ll-arc-stretch" role="status" aria-label="Loading"><i></i></span>

The CSS

@property --ll-arc-stretch-sw{syntax:'<angle>';inherits:false;initial-value:20deg}
.ll-arc-stretch{--ll-size:48px;position:relative;display:inline-block;vertical-align:middle;width:calc(var(--ll-size)*1);height:calc(var(--ll-size)*1);color:inherit}
.ll-arc-stretch>i{position:absolute;display:block}
.ll-arc-stretch>i:nth-child(1){left:calc(var(--ll-size)*.055);top:calc(var(--ll-size)*.055);width:calc(var(--ll-size)*.89);height:calc(var(--ll-size)*.89);border-radius:50%;background:conic-gradient(currentColor 0 var(--ll-arc-stretch-sw),#0000 0);-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - calc(var(--ll-size)*.09)),#000 calc(100% - calc(var(--ll-size)*.09) + 1px));mask:radial-gradient(farthest-side,#0000 calc(100% - calc(var(--ll-size)*.09)),#000 calc(100% - calc(var(--ll-size)*.09) + 1px));transform-origin:calc(var(--ll-size)*.445) calc(var(--ll-size)*.445);animation:ll-arc-stretch-grow 1.4s cubic-bezier(.65,0,.35,1) 0s infinite}
@keyframes ll-arc-stretch-grow{0%{transform:rotate(0deg);--ll-arc-stretch-sw:20deg}50%{transform:rotate(220deg);--ll-arc-stretch-sw:260deg}100%{transform:rotate(720deg);--ll-arc-stretch-sw:20deg}}

© Master Invictus. Free to use in your own personal and commercial projects. Please don't resell it or share the files themselves; link to this page instead.

More like this

All free downloads for developers and game makers · Free printables

Back to the home page