类似于下图的效果:
代码:
1 <!DOCTYPE html> 2 3 <html> 4 <head> 5 <title>Promise animation</title> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 7 <style type="text/css"> 8 .ball{ 9 width: 40px; 10 height: 40px; 11 border-radius: 20px; 12 } 13 14 .ball1{ 15 background: red; 16 } 17 .ball2{ 18 background: yellow; 19 } 20 .ball3{ 21 background: orange; 22 } 23 .ball4{ 24 background: orange; 25 } 26 .ball5{ 27 background: yellow; 28 } 29 .ball6{ 30 background: red; 31