1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | .container { margin : 0 auto ; width : 30px ; justify-content : space-around ; align-items : center ; top : 50% ; left : 50% ; transform : translate ( -50% , -50% ); position : absolute ; } .spinner--quarter { width : 48px ; border : 5px solid var(--spinner-color); border-top-color : transparent ; animation-duration : 1 s; display : block ; } .spinner { --spinner- color : #ffffff ; aspect-ratio: 1 / 1 ; border-radius : 50% ; animation-name : spin; animation-iteration-count : infinite ; animation-timing-function : linear ; } /* Keyframes Spin */ @keyframes spin { from { transform : rotate ( 0 deg); } to { transform : rotate ( 360 deg); } } |
1 | < div class = "container" >< span class = "spinner spinner--quarter" ></ span ></ div > |