|
| 1 | +<template> |
| 2 | + <div class="lds-roller"> |
| 3 | + <div></div> |
| 4 | + <div></div> |
| 5 | + <div></div> |
| 6 | + <div></div> |
| 7 | + <div></div> |
| 8 | + <div></div> |
| 9 | + <div></div> |
| 10 | + <div></div> |
| 11 | + </div> |
| 12 | +</template> |
| 13 | + |
| 14 | +<script lang="ts" setup></script> |
| 15 | + |
| 16 | +<style scoped> |
| 17 | +.lds-roller { |
| 18 | + display: inline-block; |
| 19 | + position: relative; |
| 20 | + width: 80px; |
| 21 | + height: 80px; |
| 22 | +} |
| 23 | +.lds-roller div { |
| 24 | + animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; |
| 25 | + transform-origin: 40px 40px; |
| 26 | +} |
| 27 | +.lds-roller div:after { |
| 28 | + content: " "; |
| 29 | + display: block; |
| 30 | + position: absolute; |
| 31 | + width: 7px; |
| 32 | + height: 7px; |
| 33 | + border-radius: 50%; |
| 34 | + background: #cef; |
| 35 | + margin: -4px 0 0 -4px; |
| 36 | +} |
| 37 | +.lds-roller div:nth-child(1) { |
| 38 | + animation-delay: -0.036s; |
| 39 | +} |
| 40 | +.lds-roller div:nth-child(1):after { |
| 41 | + top: 63px; |
| 42 | + left: 63px; |
| 43 | +} |
| 44 | +.lds-roller div:nth-child(2) { |
| 45 | + animation-delay: -0.072s; |
| 46 | +} |
| 47 | +.lds-roller div:nth-child(2):after { |
| 48 | + top: 68px; |
| 49 | + left: 56px; |
| 50 | +} |
| 51 | +.lds-roller div:nth-child(3) { |
| 52 | + animation-delay: -0.108s; |
| 53 | +} |
| 54 | +.lds-roller div:nth-child(3):after { |
| 55 | + top: 71px; |
| 56 | + left: 48px; |
| 57 | +} |
| 58 | +.lds-roller div:nth-child(4) { |
| 59 | + animation-delay: -0.144s; |
| 60 | +} |
| 61 | +.lds-roller div:nth-child(4):after { |
| 62 | + top: 72px; |
| 63 | + left: 40px; |
| 64 | +} |
| 65 | +.lds-roller div:nth-child(5) { |
| 66 | + animation-delay: -0.18s; |
| 67 | +} |
| 68 | +.lds-roller div:nth-child(5):after { |
| 69 | + top: 71px; |
| 70 | + left: 32px; |
| 71 | +} |
| 72 | +.lds-roller div:nth-child(6) { |
| 73 | + animation-delay: -0.216s; |
| 74 | +} |
| 75 | +.lds-roller div:nth-child(6):after { |
| 76 | + top: 68px; |
| 77 | + left: 24px; |
| 78 | +} |
| 79 | +.lds-roller div:nth-child(7) { |
| 80 | + animation-delay: -0.252s; |
| 81 | +} |
| 82 | +.lds-roller div:nth-child(7):after { |
| 83 | + top: 63px; |
| 84 | + left: 17px; |
| 85 | +} |
| 86 | +.lds-roller div:nth-child(8) { |
| 87 | + animation-delay: -0.288s; |
| 88 | +} |
| 89 | +.lds-roller div:nth-child(8):after { |
| 90 | + top: 56px; |
| 91 | + left: 12px; |
| 92 | +} |
| 93 | +@keyframes lds-roller { |
| 94 | + 0% { |
| 95 | + transform: rotate(0deg); |
| 96 | + } |
| 97 | + 100% { |
| 98 | + transform: rotate(360deg); |
| 99 | + } |
| 100 | +} |
| 101 | +</style> |
0 commit comments