鱼C论坛

 找回密码
 立即注册
查看: 2108|回复: 5

[作品展示] 纯css3制作loading花瓣加载动画效果

[复制链接]
发表于 2019-5-7 16:35:59 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
预览效果  

                               
登录/注册后可看大图

  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>花瓣加载动画-jq22.com</title>
  6. <style>
  7. body {
  8.   background: #161B29;
  9.   margin: 0 auto;
  10.   height: 100%;
  11.   width: 100%;
  12.   overflow: hidden;
  13. }

  14. .container {
  15.   width: 40vw;
  16.   height: 40vw;
  17.   position: absolute;
  18.   left: 0;
  19.   right: 0;
  20.   top: 0;
  21.   bottom: 0;
  22.   margin: auto;
  23.   overflow: hidden;
  24. }

  25. .common {
  26.   height: 5vw;
  27.   max-height: 100%;
  28.   overflow: auto;
  29.   width: 2vw;
  30.   margin: auto;
  31.   max-width: 100%;
  32.   position: absolute;
  33.   background-color: ;
  34.   border-radius: 0vw 10vw 0vw 10vw;
  35.   box-shadow: inset 0vw 0vw 0vw .1vw #E645D0, 0vw 0vw 1.5vw 0vw #E645D0;
  36. }

  37. .one {
  38.   transform: rotate(45deg);
  39.   left: 0;
  40.   right: 0;
  41.   top: 0;
  42.   bottom: 7.5vw;
  43. }

  44. .two {
  45.   transform: rotate(90deg);
  46.   left: 5.5vw;
  47.   right: 0;
  48.   top: 0;
  49.   bottom: 5.5vw;
  50. }

  51. .three {
  52.   transform: rotate(135deg);
  53.   left: 7.5vw;
  54.   right: 0;
  55.   top: 0;
  56.   bottom: 0;
  57. }

  58. .four {
  59.   transform: rotate(180deg);
  60.   left: 5.5vw;
  61.   right: 0;
  62.   top: 5.5vw;
  63.   bottom: 0;
  64. }

  65. .five {
  66.   transform: rotate(225deg);
  67.   left: 0;
  68.   right: 0;
  69.   top: 7.5vw;
  70.   bottom: 0;
  71. }

  72. .six {
  73.   transform: rotate(270deg);
  74.   left: 0;
  75.   right: 5.5vw;
  76.   top: 5.5vw;
  77.   bottom: 0;
  78. }

  79. .seven {
  80.   transform: rotate(315deg);
  81.   left: 0;
  82.   right: 7.5vw;
  83.   top: 0;
  84.   bottom: 0;
  85. }

  86. .eight {
  87.   transform: rotate(360deg);
  88.   left: 0;
  89.   right: 5.5vw;
  90.   top: 0;
  91.   bottom: 5.5vw;
  92. }

  93. .bar {
  94.   width: 12vw;
  95.   height: .25vw;
  96.   position: absolute;
  97.   left: 0;
  98.   right: 0;
  99.   top: 16vw;
  100.   bottom: 0;
  101.   margin: auto;
  102.   overflow: hidden;
  103.   background: #E645D0;
  104. }

  105. .progress {
  106.   width: 12vw;
  107.   height: .5vw;
  108.   position: absolute;
  109.   left: 0;
  110.   right: 0;
  111.   top: 0;
  112.   bottom: 0;
  113.   margin: auto;
  114.   overflow: hidden;
  115.   background: #17E1E6;
  116. }

  117. .one {
  118.   animation: one 1s ease infinite;
  119.   -moz-animation: one 1s ease infinite;
  120.   /* Firefox */
  121.   -webkit-animation: one 1s ease infinite;
  122.   /* Safari and Chrome */
  123.   -o-animation: one 1s ease infinite;
  124.   /* Opera */
  125. }

  126. @keyframes one {
  127.   0%,
  128.   100% {}
  129.   50% {
  130.     background: ;
  131.     box-shadow: inset 0vw 0vw 0vw .1vw #17E1E6, 0vw 0vw 1.5vw 0vw #17E1E6;
  132.   }
  133. }

  134. .two {
  135.   animation: two 1s .125s ease infinite;
  136.   -moz-animation: two 1s .125s ease infinite;
  137.   /* Firefox */
  138.   -webkit-animation: two 1s .125s ease infinite;
  139.   /* Safari and Chrome */
  140.   -o-animation: two 1s .125s ease infinite;
  141.   /* Opera */
  142. }

  143. @keyframes two {
  144.   0%,
  145.   100% {}
  146.   50% {
  147.     background: ;
  148.     box-shadow: inset 0vw 0vw 0vw .1vw #17E1E6, 0vw 0vw 1.5vw 0vw #17E1E6;
  149.   }
  150. }

  151. .three {
  152.   animation: three 1s .25s ease infinite;
  153.   -moz-animation: three 1s .25s ease infinite;
  154.   /* Firefox */
  155.   -webkit-animation: three 1s .25s ease infinite;
  156.   /* Safari and Chrome */
  157.   -o-animation: three 1s .25s ease infinite;
  158.   /* Opera */
  159. }

  160. @keyframes three {
  161.   0%,
  162.   100% {}
  163.   50% {
  164.     background: ;
  165.     box-shadow: inset 0vw 0vw 0vw .1vw #17E1E6, 0vw 0vw 1.5vw 0vw #17E1E6;
  166.   }
  167. }

  168. .four {
  169.   animation: four 1s .375s ease infinite;
  170.   -moz-animation: four 1s .375s ease infinite;
  171.   /* Firefox */
  172.   -webkit-animation: four 1s .375s ease infinite;
  173.   /* Safari and Chrome */
  174.   -o-animation: four 1s .375s ease infinite;
  175.   /* Opera */
  176. }

  177. @keyframes four {
  178.   0%,
  179.   100% {}
  180.   50% {
  181.     background: ;
  182.     box-shadow: inset 0vw 0vw 0vw .1vw #17E1E6, 0vw 0vw 1.5vw 0vw #17E1E6;
  183.   }
  184. }

  185. .five {
  186.   animation: five 1s .5s ease infinite;
  187.   -moz-animation: five 1s .5s ease infinite;
  188.   /* Firefox */
  189.   -webkit-animation: five 1s .5s ease infinite;
  190.   /* Safari and Chrome */
  191.   -o-animation: five 1s .5s ease infinite;
  192.   /* Opera */
  193. }

  194. @keyframes five {
  195.   0%,
  196.   100% {}
  197.   50% {
  198.     background: ;
  199.     box-shadow: inset 0vw 0vw 0vw .1vw #17E1E6, 0vw 0vw 1.5vw 0vw #17E1E6;
  200.   }
  201. }

  202. .six {
  203.   animation: six 1s .625s ease infinite;
  204.   -moz-animation: six 1s .625s ease infinite;
  205.   /* Firefox */
  206.   -webkit-animation: six 1s .625s ease infinite;
  207.   /* Safari and Chrome */
  208.   -o-animation: six 1s .625s ease infinite;
  209.   /* Opera */
  210. }

  211. @keyframes six {
  212.   0%,
  213.   100% {}
  214.   50% {
  215.     background: ;
  216.     box-shadow: inset 0vw 0vw 0vw .1vw #17E1E6, 0vw 0vw 1.5vw 0vw #17E1E6;
  217.   }
  218. }

  219. .seven {
  220.   animation: seven 1s .750s ease infinite;
  221.   -moz-animation: seven 1s .750s ease infinite;
  222.   /* Firefox */
  223.   -webkit-animation: seven 1s .750s ease infinite;
  224.   /* Safari and Chrome */
  225.   -o-animation: seven 1s .750s ease infinite;
  226.   /* Opera */
  227. }

  228. @keyframes seven {
  229.   0%,
  230.   100% {}
  231.   50% {
  232.     background: ;
  233.     box-shadow: inset 0vw 0vw 0vw .1vw #17E1E6, 0vw 0vw 1.5vw 0vw #17E1E6;
  234.   }
  235. }

  236. .eight {
  237.   animation: eight 1s .875s ease infinite;
  238.   -moz-animation: eight 1s .875s ease infinite;
  239.   /* Firefox */
  240.   -webkit-animation: eight 1s .875s ease infinite;
  241.   /* Safari and Chrome */
  242.   -o-animation: eight 1s .875s ease infinite;
  243.   /* Opera */
  244. }

  245. @keyframes eight {
  246.   0%,
  247.   100% {}
  248.   50% {
  249.     background: ;
  250.     box-shadow: inset 0vw 0vw 0vw .1vw #17E1E6, 0vw 0vw 1.5vw 0vw #17E1E6;
  251.   }
  252. }

  253. .container {
  254.   animation: container 5s linear infinite;
  255.   -moz-animation: container 5s linear infinite;
  256.   /* Firefox */
  257.   -webkit-animation: container 5s linear infinite;
  258.   /* Safari and Chrome */
  259.   -o-animation: container 5s linear infinite;
  260.   /* Opera */
  261. }

  262. @keyframes container {
  263.   from {
  264.     transform: rotate(0deg);
  265.   }
  266.   to {
  267.     transform: rotate(-360deg);
  268.   }
  269. }

  270. .progress {
  271.   animation: progress 15s ease;
  272.   -moz-animation: progress 15s ease;
  273.   /* Firefox */
  274.   -webkit-animation: progress 15s ease;
  275.   /* Safari and Chrome */
  276.   -o-animation: progress 15s ease;
  277.   /* Opera */
  278. }

  279. @keyframes progress {
  280.   0% {
  281.     left: -24vw;
  282.   }
  283.   10% {
  284.     left: -20vw;
  285.   }
  286.   30% {
  287.     left: -16vw;
  288.   }
  289.   50% {
  290.     left: -12vw;
  291.   }
  292.   65% {
  293.     left: -10vw;
  294.   }
  295.   80% {
  296.     left: -4vw;
  297.   }
  298.   100% {
  299.     left: 0;
  300.   }
  301. }

  302. .fade-in {
  303.   animation: fade-in 2s ease;
  304.   -moz-animation: fade-in 2s ease;
  305.   /* Firefox */
  306.   -webkit-animation: fade-in 2s ease;
  307.   /* Safari and Chrome */
  308.   -o-animation: fade-in 2s ease;
  309.   /* Opera */
  310. }

  311. @keyframes fade-in {
  312.   from {
  313.     opacity: 0;
  314.   }
  315.   to {
  316.     opacity: 1;
  317.   }
  318. }

  319. .out {
  320.   animation: out 2s 15s ease;
  321.   -moz-animation: out 2s 15s ease;
  322.   /* Firefox */
  323.   -webkit-animation: out 2s 15s ease;
  324.   /* Safari and Chrome */
  325.   -o-animation: out 2s 15s ease;
  326.   /* Opera */
  327. }

  328. @keyframes out {
  329.   from {
  330.     opacity: 1;
  331.   }
  332.   to {
  333.     opacity: 0;
  334.   }
  335. }</style>
  336. </head>
  337. <body>
  338. <div class="out">
  339.   <div class="fade-in">
  340.     <div class="container">
  341.       <div class="one common"></div>
  342.       <div class="two common"></div>
  343.       <div class="three common"></div>
  344.       <div class="four common"></div>
  345.       <div class="five common"></div>
  346.       <div class="six common"></div>
  347.       <div class="seven common"></div>
  348.       <div class="eight common"></div>
  349.     </div>
  350.     <div class="bar">
  351.       <div class="progress"></div>
  352.     </div>
  353.   </div>

  354. <script>
  355. </script>

  356. </body>
  357. </html>
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2019-12-7 19:50:54 | 显示全部楼层
谢谢大佬
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-4-4 23:40:07 | 显示全部楼层
免费的哦
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-4-6 15:06:30 | 显示全部楼层
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2021-6-5 14:42:31 | 显示全部楼层
赛高!!!!!!!!!!!
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2021-6-15 23:29:59 | 显示全部楼层
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-4-22 01:07

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表