//  =========================================第一个动画
<template>
<!-- 这个组件用于 页面下滑到底部时 展示加载动画 -->
<view>
<!-- 加载动画 -->
<view class='loadTextAnimotion'>
<view class='pillar animotion01'></view>
<view class='pillar animotion02'></view>
<view class='pillar animotion03'></view>
<view class='pillar animotion04'></view>
<view class='pillar animotion05'></view>
<view class='pillar animotion06'></view>
</view>
</view>
</template> <script> export default {
data () {
return {}
}
}
</script> <style lang="less" scoped>
.loadTextAnimotion{ // 点击加载后的动画
text-align: center;
line-height: 150upx;
color: #c5c2c2;
font-weight: bold;
.pillar{
display:inline-block;
vertical-align: middle;
background-color: #c5c2c2;
width:10upx;
border-radius: 40upx;
margin: 0 10upx;
}
.animotion01{
animation: pillarHeight 1s infinite -0.5s;
}
.animotion02{
animation: pillarHeight 1s infinite -0.4s;
}
.animotion03{
animation: pillarHeight 1s infinite -0.3s;
}
.animotion04{
animation: pillarHeight 1s infinite -0.2s;
}
.animotion05{
animation: pillarHeight 1s infinite -0.1s;
}
.animotion06{
animation: pillarHeight 1s infinite;
}
@keyframes pillarHeight {
0% {height:20upx}
50% {height:60upx}
100% {height:20upx}
}
}
</style>

//  =========================================第二个动画
<template>
<view class='load-mask'>
<view class="load-container">
<view class='load p1'/>
<view class='load p2'/>
<view class='load p3'/>
<view class='load p4'/>
</view>
</view>
</template> <script>
export default { }
</script> <style lang="less" scoped>
.load-mask{
width: 100%;
height: 100%;
position: absolute;
top: 0upx;
left: 0upx;
background-color: rgba(255, 255, 255, 0.5); display: flex;
justify-content: center;
align-items: center;
.load-container{
position: relative;
.load{
position: absolute;
transform: translate(-50%, -50%)
}
.p1{
border: 50upx solid transparent;
border-top-color: rgb(97,203,211);
animation: p1 1s infinite;
}
.p2{
border: 50upx solid transparent;
border-right-color: rgb(97,203,211);
animation: p2 1s infinite;
}
.p3{
border: 50upx solid transparent;
border-bottom-color: rgb(97,203,211);
animation: p3 1s infinite;
}
.p4{
border: 50upx solid transparent;
border-left-color: rgb(97,203,211);
animation: p4 1s infinite;
}
@keyframes p1 { 0% { top: 0upx } 50% { top: -50upx } 100% { top: 0upx } }
@keyframes p2 { 0% { left: 0upx } 50% { left: 50upx } 100% { left: 0upx } }
@keyframes p3 { 0% { top: 0upx } 50% { top: 50upx } 100% { top: 0upx } }
@keyframes p4 { 0% { left: 0upx } 50% { left: -50upx } 100% { left: 0upx } }
}
}
</style>

  

 

  

css实现项目中的加载动画的更多相关文章

  1. android项目中如何加载已有so库 <转>

    1,在项目根目录下建立文件夹libs/armeabi文件夹 2,将so库放入 libs/armeabi文件夹 注意事项: 1,如果采用静态注册的方式请注意C文件中严格按照命名规则 Java_packa ...

  2. web项目中js加载慢问题解决思路

    最近使用Echarts地图(版本为echarts2,echarts3目前无法下载地图版). 问题描述:之前使用require形式加载,地图首次加载显示要6-7秒,难以接受. js配置代码如下: < ...

  3. mvvm模式下在WPF项目中动态加载项目的程序集和类

    在mvvm模式的wpf项目中有个需求需要去加载解决方案的程序集,并且根据程序集去动态加载当前程序集的类,做成下拉框形式. 效果: //全局定义 private ComboBox abList= nul ...

  4. ​网页图表Highcharts实践教程之标签组与加载动画

    ​网页图表Highcharts实践教程之标签组与加载动画 Highcharts标签组 在图表的大部分元素都提供了标签功能.但非常多时候,我们须要额外说明一些信息.这个时候借助原有的图表元素的标签功能就 ...

  5. 为网格布局图片打造的超炫 CSS 加载动画

    今天,我想与大家分享一些专门为网格布局的图像制作的很酷的 CSS 加载动画效果.您可以把这些效果用在你的作品集,博客或任何你想要的网页中.设置很简单.我们使用了下面这些工具库来实现这个效果: Norm ...

  6. CSS 实现加载动画之一-菊花旋转

    最近打算整理几个动画样式,最常见的就是我们用到的加载动画.加载动画的效果处理的好,会给页面带来画龙点睛的作用,而使用户愿意去等待.而页面中最常用的做法是把动画做成gif格式,当做背景图或是img标签来 ...

  7. CSS 实现加载动画之七-彩环旋转

    今天整理的这个动画估计大家都不会陌生,彩环旋转,看过之后是不是觉得很熟悉,对,这个就是优酷视频APP里面的加载动画.本人空余时间喜欢看些视频,留意到这个动画后就想用代码实现出来,今天整理了下,跟大家分 ...

  8. CSS 实现加载动画之六-大风车

    这个动画改编自光盘旋转,前几个步骤一样,最后一步不同.光盘旋转的最后一步是外层容器加个圆形的白色边框,多余部分隐藏,这个案例则是在每个旋转的子元素的顶部或底部增加一个三角形的元素,构成风车旋转的角. ...

  9. CSS 实现加载动画之五-光盘旋转

    今天做的这个动画叫光盘旋转,名字自己取的.动画的效果估计很多人都很熟悉,就是微信朋友圈里的加载动画.做过前面几个动画,发现其实都一个原理,就是如何将动画的元素如何分离出来.这个动画的实现也很简单,关键 ...

随机推荐

  1. 05 | 箭头函数 | es6

    基本用法 参数列表)=> {函数体} var f = v => v; 上面的箭头函数等同于: var f = function(v) { return v; }; 如果箭头函数不需要参数或 ...

  2. Springboot+vue前后端分离项目,poi导出excel提供用户下载的解决方案

    因为我们做的是前后端分离项目 无法采用response.write直接将文件流写出 我们采用阿里云oss 进行保存 再返回的结果对象里面保存我们的文件地址 废话不多说,上代码 Springboot 第 ...

  3. sqlalchemy insert or ignore

    insert ignore # insert ignoreinsert_stmt = TimePoint.__table__.insert().prefix_with(" ignore&qu ...

  4. Beyond compare 4.2.3 激活和秘钥

    安装完 Beyond Compare 4.2.3 以后.打开输入密匙是不是会跳到官网去?不用慌,我们只需要删除你安装Beyond Compare 4目录下的 BCUnrar.dll 文件,然后再打开就 ...

  5. Part 38 AngularJS cancel route change

    n this video we will discuss, how to cancel route change in Angular with an example. This is extreme ...

  6. Pycharm下载安装详细教程

    目录 1.Pycharm 简介 2.Pycharm下载 3.环境变量的配置 4.Pycharm的使用 1.Pycharm 简介 PyCharm是一种Python IDE(Integrated Deve ...

  7. Python变量和数据类型,类型转换

    a.变量的定义 把数据分别用一个简单的名字代表,方便在接下来的程序中引用. 变量就是代表某个数据(值)的名称. 变量就是用来存储数据的,将不同的数据类型存储到内存   b.变量的赋值 变量名= 初始值 ...

  8. [loj6271]生成树求和

    将每一位拆开考虑,即不妨假设$0\le c<3$ 考虑矩阵树定理,即统计所有生成树边权乘积的和,但我们这里要将边权相加,很明显将其作为幂次(如果作为$cx+1$无法对3取模) 更具体的,也就是将 ...

  9. [luogu5162]WD与积木

    设$g_{n}$表示$n$个积木放的方案数,枚举最后一层所放的积木,则有$g_{n}=\sum_{i=1}^{n}c(n,i)g_{n-i}$(因为积木有编号的所以要选出$i$个) 将组合数展开并化简 ...

  10. spring boot(三)整合 redis

    Spring boot 集成redis 为什么要用redis,它解决了什么问题? Redis 是一个高性能的key-value内存数据库.它支持常用的5种数据结构:String字符串.Hash哈希表. ...