index.wxml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<view class="tui-loading-row"> <view class="tui-loading-cell"> <view class="circle-line"> <text></text> <text></text> <text></text> <text></text> <text></text> <text></text> <text></text> <text></text> </view> </view> </view> |
index.wxss
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
.circle-line{ width: 100px; height: 100px; display: inline-block; position: relative; } .circle-line text{ display: block; width: 50%; height: 5px; opacity: .7; position: absolute; top: calc(50% - 2.5px); left: 0px; transform-origin: center right; animation: circle 1.5s linear infinite; } .circle-line text::before{ content: ''; display: block; width: 15px; height: 5px; position: absolute; top: 0; right: 10px; background-color: blue; } .circle-line text:nth-child(1){ transform: rotate(0deg); animation-delay: 0.2s; } .circle-line text:nth-child(2){ transform: rotate(45deg); animation-delay: 0.4s; } .circle-line text:nth-child(3){ transform: rotate(90deg); animation-delay: 0.6s; } .circle-line text:nth-child(4){ transform: rotate(135deg); animation-delay: 0.8s; } .circle-line text:nth-child(5){ transform: rotate(180deg); animation-delay: 1s; } .circle-line text:nth-child(6){ transform: rotate(225deg); animation-delay: 1.2s; } .circle-line text:nth-child(7){ transform: rotate(270deg); animation-delay: 1.4s; } .circle-line text:nth-child(8){ transform: rotate(315deg); animation-delay: 1.6s; } @keyframes circle { 0%{ opacity: 0.05; } 100%{ opacity: 0.9; } } |