#212121
1.container { 2 width: 200px; 3 height: 150px; 4 margin: 0 auto; 5} 6 7.ball { 8 width: 10px; 9 height: 10px; 10 margin: 10px auto; 11 border-radius: 50px; 12} 13 14.ball:nth-child(1) { 15 background: #ffffff; 16 animation: right2 1s infinite ease-in-out; 17} 18 19.ball:nth-child(2) { 20 background: #ffffff; 21 animation: left2 1.1s infinite ease-in-out; 22} 23 24.ball:nth-child(3) { 25 background: #ffffff; 26 animation: right2 1.05s infinite ease-in-out; 27} 28 29.ball:nth-child(4) { 30 background: #ffffff; 31 animation: left2 1.15s infinite ease-in-out; 32} 33 34.ball:nth-child(5) { 35 background: #ffffff; 36 animation: right2 1.1s infinite ease-in-out; 37} 38 39.ball:nth-child(6) { 40 background: #ffffff; 41 animation: left2 1.05s infinite ease-in-out; 42} 43 44.ball:nth-child(7) { 45 background: #ffffff; 46 animation: right2 1s infinite ease-in-out; 47} 48 49@keyframes right2 { 50 0% { 51 transform: translate(-15px); 52 } 53 54 50% { 55 transform: translate(15px); 56 } 57 58 100% { 59 transform: translate(-15px); 60 } 61} 62 63@keyframes left2 { 64 0% { 65 transform: translate(15px); 66 } 67 68 50% { 69 transform: translate(-15px); 70 } 71 72 100% { 73 transform: translate(15px); 74 } 75}
Comments
MIT License