我的编程空间,编程开发者的网络收藏夹
学习永远不晚

css中常见的loding效果实现方法有哪些

短信预约 -IT技能 免费直播动态提醒
省份

北京

  • 北京
  • 上海
  • 天津
  • 重庆
  • 河北
  • 山东
  • 辽宁
  • 黑龙江
  • 吉林
  • 甘肃
  • 青海
  • 河南
  • 江苏
  • 湖北
  • 湖南
  • 江西
  • 浙江
  • 广东
  • 云南
  • 福建
  • 海南
  • 山西
  • 四川
  • 陕西
  • 贵州
  • 安徽
  • 广西
  • 内蒙
  • 西藏
  • 新疆
  • 宁夏
  • 兵团
手机号立即预约

请填写图片验证码后获取短信验证码

看不清楚,换张图片

免费获取短信验证码

css中常见的loding效果实现方法有哪些

这篇文章主要为大家展示了“css中常见的loding效果实现方法有哪些”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“css中常见的loding效果实现方法有哪些”这篇文章吧。

<html lang="en">

 

       <head>

              <meta charset="UTF-8">

              <title>Loading</title>

              <link rel="stylesheet" type="text/css" href="loading.css">

              <style>

                     .loader {

                            float: left;

                     }

                    

                     .loader {

                            position: relative;

                            width: 5rem;

                            height: 5rem;

                     }

                    

                     .loader.small {

                            -webkit-transform: scale(.5);

                            transform: scale(.5);

                     }

                    

                     .loader.circle-line,

                     .loader.circle-round {

                            height: 5rem;

                     }

                    

                    

                     .loader.circle-line span {

                            position: absolute;

                            display: inline-block;

                            width: 1.5rem;

                            height: .5rem;

                            border-top-left-radius: .25rem;

                            border-bottom-left-radius: .25rem;

                            background: #1ABC9C;

                            opacity: .05;

                            -webkit-animation: circle-line 1s ease infinite;

                            animation: circle-line 1s ease infinite;

                     }

                    

                     .loader.circle-line span:nth-child(1) {

                            top: 50%;

                            left: 0;

                            margin-top: -.25rem;

                            -webkit-animation-delay: .13s;

                            animation-delay: .13s;

                     }

                    

                     .loader.circle-line span:nth-child(2) {

                            top: 1rem;

                            left: .5rem;

                            -webkit-transform: rotate(45deg);

                            transform: rotate(45deg);

                            -webkit-animation-delay: .26s;

                            animation-delay: .26s;

                     }

                    

                     .loader.circle-line span:nth-child(3) {

                            left: 50%;

                            top: .5rem;

                            margin-left: -.75rem;

                            -webkit-transform: rotate(90deg);

                            transform: rotate(90deg);

                            -webkit-animation-delay: .39s;

                            animation-delay: .39s;

                     }

                    

                     .loader.circle-line span:nth-child(4) {

                            right: .5rem;

                            top: 1rem;

                            -webkit-transform: rotate(145deg);

                            transform: rotate(145deg);

                            -webkit-animation-delay: .52s;

                            animation-delay: .52s;

                     }

                    

                     .loader.circle-line span:nth-child(5) {

                            left: 3.5rem;

                            top: 50%;

                            margin-top: -.25rem;

                            -webkit-transform: rotate(180deg);

                            transform: rotate(180deg);

                            -webkit-animation-delay: .65s;

                            animation-delay: .65s;

                     }

                    

                     .loader.circle-line span:nth-child(6) {

                            bottom: 1rem;

                            right: .5rem;

                            -webkit-transform: rotate(-145deg);

                            transform: rotate(-145deg);

                            -webkit-animation-delay: .78s;

                            animation-delay: .78s;

                     }

                    

                     .loader.circle-line span:nth-child(7) {

                            left: 50%;

                            bottom: .5rem;

                            margin-left: -15px;

                            -webkit-transform: rotate(-90deg);

                            transform: rotate(-90deg);

                            -webkit-animation-delay: .91s;

                            animation-delay: .91s;

                     }

                    

                     .loader.circle-line span:nth-child(8) {

                            bottom: 1rem;

                            left: .5rem;

                            -webkit-transform: rotate(-45deg);

                            transform: rotate(-45deg);

                            -webkit-animation-delay: 1.04s;

                            animation-delay: 1.04s;

                     }

                    

                     @keyframes circle-line {

                            0% {

                                   opacity: .05;

                            }

                            100% {

                                   opacity: .7;

                            }

                     }

                    

                     @-webkit-keyframes circle-line {

                            0% {

                                   opacity: .05;

                            }

                            100% {

                                   opacity: .7;

                            }

                     }

                    

                    

                     .loader.circle-line-spin .circle-line-inner {

                            width: 100%;

                            height: 100%;

                            -webkit-animation: circle-line-spin 1.5s linear infinite;

                            animation: circle-line-spin 1.5s linear infinite;

                     }

                    

                     .loader.circle-line-spin span {

                            position: absolute;

                            display: inline-block;

                            width: 1.5rem;

                            height: .5rem;

                            border-top-left-radius: .25rem;

                            border-bottom-left-radius: .25rem;

                            background: #1ABC9C;

                            opacity: .7;

                     }

                    

                     .loader.circle-line-spin span:nth-child(1) {

                            top: 50%;

                            left: 0;

                            margin-top: -.25rem;

                     }

                    

                     .loader.circle-line-spin span:nth-child(2) {

                            top: 1rem;

                            left: .5rem;

                            -webkit-transform: rotate(45deg);

                            transform: rotate(45deg);

                     }

                    

                     .loader.circle-line-spin span:nth-child(3) {

                            left: 50%;

                            top: .5rem;

                            margin-left: -.75rem;

                            -webkit-transform: rotate(90deg);

                            transform: rotate(90deg);

                     }

                    

                     .loader.circle-line-spin span:nth-child(4) {

                            right: .5rem;

                            top: 1rem;

                            -webkit-transform: rotate(145deg);

                            transform: rotate(145deg);

                     }

                    

                     .loader.circle-line-spin span:nth-child(5) {

                            left: 3.5rem;

                            top: 50%;

                            margin-top: -.25rem;

                            -webkit-transform: rotate(180deg);

                            transform: rotate(180deg);

                     }

                    

                     .loader.circle-line-spin span:nth-child(6) {

                            bottom: 1rem;

                            right: .5rem;

                            -webkit-transform: rotate(-145deg);

                            transform: rotate(-145deg);

                     }

                    

                     .loader.circle-line-spin span:nth-child(7) {

                            left: 50%;

                            bottom: .5rem;

                            margin-left: -15px;

                            -webkit-transform: rotate(-90deg);

                            transform: rotate(-90deg);

                     }

                    

                     .loader.circle-line-spin span:nth-child(8) {

                            bottom: 1rem;

                            left: .5rem;

                            -webkit-transform: rotate(-45deg);

                            transform: rotate(-45deg);

                     }

                    

                     @keyframes circle-line-spin {

                            0% {

                                   transform: rotate(0);

                            }

                            100% {

                                   transform: rotate(360deg);

                            }

                     }

                    

                     @-webkit-keyframes circle-line-spin {

                            0% {

                                   -webkit-transform: rotate(0);

                            }

                            100% {

                                   -webkit-transform: rotate(360deg);

                            }

                     }

                    

                    

                     .loader.circle-round span {

                            opacity: .05;

                            -webkit-animation: circle-round 1s ease infinite;

                            animation: circle-round 1s ease infinite;

                     }

                    

                     .loader.circle-round-fade span {

                            -webkit-animation: circle-round-fade 1s ease infinite;

                            animation: circle-round-fade 1s ease infinite;

                     }

                    

                     .loader.circle-round span,

                     .loader.circle-round-fade span {

                            position: absolute;

                            width: .8rem;

                            height: .8rem;

                            display: inline-block;

                            border-radius: 50%;

                            background: #1ABC9C;

                     }

                    

                     .loader.circle-round span:nth-child(1),

                     .loader.circle-round-fade span:nth-child(1) {

                            top: 50%;

                            left: 0;

                            margin-top: -.4rem;

                            -webkit-animation-delay: -1.04s;

                            animation-delay: -1.04s;

                     }

                    

                     .loader.circle-round span:nth-child(2),

                     .loader.circle-round-fade span:nth-child(2) {

                            top: .7rem;

                            left: .7rem;

                            -webkit-animation-delay: -.91s;

                            animation-delay: -.91s;

                     }

                    

                     .loader.circle-round span:nth-child(3),

                     .loader.circle-round-fade span:nth-child(3) {

                            top: 0;

                            left: 50%;

                            margin-left: -.4rem;

                            -webkit-animation-delay: -.78s;

                            animation-delay: -.78s;

                     }

                    

                     .loader.circle-round span:nth-child(4),

                     .loader.circle-round-fade span:nth-child(4) {

                            right: .7rem;

                            top: .7rem;

                            -webkit-animation-delay: -.65s;

                            animation-delay: -.65s;

                     }

                    

                     .loader.circle-round span:nth-child(5),

                     .loader.circle-round-fade span:nth-child(5) {

                            right: 0;

                            top: 50%;

                            margin-top: -.4rem;

                            -webkit-animation-delay: -.52s;

                            animation-delay: -.52s;

                     }

                    

                     .loader.circle-round span:nth-child(6),

                     .loader.circle-round-fade span:nth-child(6) {

                            bottom: .7rem;

                            right: .7rem;

                            -webkit-animation-delay: -.39s;

                            animation-delay: -.39s;

                     }

                    

                     .loader.circle-round span:nth-child(7),

                     .loader.circle-round-fade span:nth-child(7) {

                            bottom: 0;

                            left: 50%;

                            margin-left: -.4rem;

                            -webkit-animation-delay: -.26s;

                            animation-delay: -.26s;

                     }

                    

                     .loader.circle-round span:nth-child(8),

                     .loader.circle-round-fade span:nth-child(8) {

                            left: .7rem;

                            bottom: .7rem;

                            -webkit-animation-delay: -.13s;

                            animation-delay: -.13s;

                     }

                    

                     @keyframes circle-round {

                            0% {

                                   opacity: .05;

                            }

                            100% {

                                   opacity: .7;

                            }

                     }

                    

                     @-webkit-keyframes circle-round {

                            0% {

                                   opacity: .05;

                            }

                            100% {

                                   opacity: .7;

                            }

                     }

                    

                     @keyframes circle-round-fade {

                            0% {

                                   opacity: .25;

                                   transform: scale(.2);

                            }

                            100% {

                                   opacity: 1;

                                   transform: scale(1);

                            }

                     }

                    

                     @-webkit-keyframes circle-round-fade {

                            0% {

                                   opacity: .25;

                                   transform: scale(.2);

                            }

                            100% {

                                   opacity: 1;

                                   transform: scale(1);

                            }

                     }

                    

                    

                     .loader.line-square {

                            width: 6rem;

                            height: .8rem;

                     }

                    

                     .loader.line-square span {

                            position: absolute;

                            top: 0;

                            width: .8rem;

                            height: .8rem;

                            display: inline-block;

                            background: #1ABC9C;

                            -webkit-animation: line-square 1s ease infinite;

                            animation: line-square 1s ease infinite;

                     }

                    

                     .loader.line-square span:nth-child(1) {

                            left: 0;

                            -webkit-animation-delay: .13s;

                            animation-delay: .13s;

                     }

                    

                     .loader.line-square span:nth-child(2) {

                            left: 1.3rem;

                            -webkit-animation-delay: .26s;

                            animation-delay: .26s;

                     }

                    

                     .loader.line-square span:nth-child(3) {

                            left: 2.6rem;

                            -webkit-animation-delay: .39s;

                            animation-delay: .39s;

                     }

                    

                     .loader.line-square span:nth-child(4) {

                            left: 3.9rem;

                            -webkit-animation-delay: .52s;

                            animation-delay: .52s;

                     }

                    

                     .loader.line-square span:nth-child(5) {

                            left: 5.2rem;

                            -webkit-animation-delay: .65s;

                            animation-delay: .65s;

                     }

                    

                     @keyframes line-square {

                            0% {

                                   opacity: 1;

                                   transform: scale(1.2);

                                   -webkit-transform: scale(1.2);

                            }

                            100% {

                                   opacity: .2;

                                   transform: scale(.2);

                                   -webkit-transform: scale(.2);

                            }

                     }

                    

                     @-webkit-keyframes line-square {

                            0% {

                                   opacity: 1;

                                   transform: scale(1.2);

                                   -webkit-transform: scale(1.2);

                            }

                            100% {

                                   opacity: .2;

                                   transform: scale(.2);

                                   -webkit-transform: scale(.2);

                            }

                     }

                    

                    

                     .loader.line-round {

                            width: 6rem;

                            height: .8rem;

                     }

                    

                     .loader.line-round span {

                            position: absolute;

                            top: 0;

                            width: .8rem;

                            height: .8rem;

                            border-radius: 50%;

                            display: inline-block;

                            background: #1ABC9C;

                            -webkit-animation: line-round 1s ease infinite;

                            animation: line-round 1s ease infinite;

                     }

                    

                     .loader.line-round span:nth-child(1) {

                            left: 0;

                            -webkit-animation-delay: .13s;

                            animation-delay: .13s;

                     }

                    

                     .loader.line-round span:nth-child(2) {

                            left: 1.3rem;

                            -webkit-animation-delay: .26s;

                            animation-delay: .26s;

                     }

                    

                     .loader.line-round span:nth-child(3) {

                            left: 2.6rem;

                            -webkit-animation-delay: .39s;

                            animation-delay: .39s;

                     }

                    

                     .loader.line-round span:nth-child(4) {

                            left: 3.9rem;

                            -webkit-animation-delay: .52s;

                            animation-delay: .52s;

                     }

                    

                     .loader.line-round span:nth-child(5) {

                            left: 5.2rem;

                            -webkit-animation-delay: .65s;

                            animation-delay: .65s;

                     }

                    

                     @keyframes line-round {

                            0% {

                                   opacity: 1;

                                   transform: scale(1.2);

                                   -webkit-transform: scale(1.2);

                            }

                            100% {

                                   opacity: .2;

                                   transform: scale(.2);

                                   -webkit-transform: scale(.2);

                            }

                     }

                    

                     @-webkit-keyframes line-round {

                            0% {

                                   opacity: 1;

                                   transform: scale(1.2);

                                   -webkit-transform: scale(1.2);

                            }

                            100% {

                                   opacity: .2;

                                   transform: scale(.2);

                                   -webkit-transform: scale(.2);

                            }

                     }

                    

                    

                     .loader.line-bounce {

                            width: 6rem;

                            height: 2.5rem;

                     }

                    

                     .loader.line-bounce span {

                            position: absolute;

                            top: 0;

                            width: .5rem;

                            height: 2.5rem;

                            border-radius: 5px;

                            display: inline-block;

                            background: #1ABC9C;

                            -webkit-animation: line-bounce 1s ease infinite;

                            animation: line-bounce 1s ease infinite;

                     }

                    

                     .loader.line-bounce span:nth-child(1) {

                            left: 0;

                            -webkit-animation-delay: -.65s;

                            animation-delay: -.65s;

                     }

                    

                     .loader.line-bounce span:nth-child(2) {

                            left: 1.3rem;

                            -webkit-animation-delay: -.78s;

                            animation-delay: -.78s;

                     }

                    

                     .loader.line-bounce span:nth-child(3) {

                            left: 2.6rem;

                            -webkit-animation-delay: -.91s;

                            animation-delay: -.91s;

                     }

                    

                     .loader.line-bounce span:nth-child(4) {

                            left: 3.9rem;

                            -webkit-animation-delay: -.78s;

                            animation-delay: -78s;

                     }

                    

                     .loader.line-bounce span:nth-child(5) {

                            left: 5.2rem;

                            -webkit-animation-delay: -.65s;

                            animation-delay: -.65s;

                     }

                    

                     @keyframes line-bounce {

                            0% {

                                   transform: scaleY(1);

                            }

                            50% {

                                   transform: scaleY(.3);

                            }

                            100% {

                                   transform: scaleY(1);

                            }

                     }

                    

                     @-webkit-keyframes line-bounce {

                            0% {

                                   -webkit-transform: scaleY(1);

                            }

                            50% {

                                   -webkit-transform: scaleY(.3);

                            }

                            100% {

                                   -webkit-transform: scaleY(1);

                            }

                     }

                    

                    

                     .loader.circle-spin {

                            border-radius: 50%;

                            border: .2rem solid rgba(0, 0, 0, .05);

                            width: 4rem;

                            height: 4rem;

                            box-sizing: content-box;

                     }

                    

                     .loader.circle-spin .loader-placeholder {

                            position: absolute;

                            top: -.2rem;

                            left: -.2rem;

                            border-radius: 50%;

                            border: .2rem solid transparent;

                            border-top: .2rem solid #1ABC9C;

                            width: 4rem;

                            height: 4rem;

                            box-sizing: content-box;

                            -webkit-animation: circle-spin 1s ease infinite;

                            animation: circle-spin 1s ease infinite;

                     }

                    

                     @keyframes circle-spin {

                            0% {

                                   transform: rotate(0);

                            }

                            100% {

                                   transform: rotate(360deg);

                            }

                     }

                    

                     @-webkit-keyframes circle-spin {

                            0% {

                                   -webkit-transform: rotate(0);

                            }

                            100% {

                                   -webkit-transform: rotate(360deg);

                            }

                     }

              </style>

       </head>

 

       <body>

              <div class="loading">

                     <div class="loader circle-line small">

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                     </div>

                     <div class="loader circle-line-spin small">

                            <div class="circle-line-inner">

                                   <span></span>

                                   <span></span>

                                   <span></span>

                                   <span></span>

                                   <span></span>

                                   <span></span>

                                   <span></span>

                                   <span></span>

                            </div>

                     </div>

                     <div class="loader circle-round small">

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                     </div>

                     <div class="loader circle-round-fade small">

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                     </div>

                     <div class="loader line-square small">

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                     </div>

                     <div class="loader line-round small">

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                     </div>

                     <div class="loader line-bounce small">

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                            <span></span>

                     </div>

                     <div class="loader circle-spin small">

                            <div class="loader-placeholder"></div>

                     </div>

              </div>

 

       </body>

 

</html>

以上是“css中常见的loding效果实现方法有哪些”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注编程网行业资讯频道!

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

css中常见的loding效果实现方法有哪些

下载Word文档到电脑,方便收藏和打印~

下载Word文档

猜你喜欢

css中有哪些实现等高布局常的方法

这篇文章给大家介绍css中有哪些实现等高布局常的方法,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。什么是csscss是一种用来表现HTML或XML等文件样式的计算机语言,主要是用来设计网页的样式,使网页更加美化。它也是
2023-06-08

JavaScript中String常见的方法有哪些

这篇文章主要介绍JavaScript中String常见的方法有哪些,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!1、charAt从一个字符串中返回指定的字符语法str.charAt(index)参数index一个介于
2023-06-25

JS实现轮播图效果的方法有哪些

这篇文章主要讲解了“JS实现轮播图效果的方法有哪些”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“JS实现轮播图效果的方法有哪些”吧!Js实现轮播图01实现思路这可能是轮播图最简单点的实现之一
2023-06-25

javascript中常见的数组方法有哪些

小编给大家分享一下javascript中常见的数组方法有哪些,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!javascript数组方法有:concat()、join()、pop()、push()、reverse()、shi
2023-06-14

Java中enum常见的使用方法有哪些

这篇文章主要介绍了Java中enum常见的使用方法有哪些,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。Java的特点有哪些Java的特点有哪些1.Java语言作为静态面向对象
2023-06-14

CSS盒子居中常用的方法有哪些

小编给大家分享一下CSS盒子居中常用的方法有哪些,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!第一种:用css的position属性