//  =========================================第一个动画
<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. JSON数据和Java对象的相互转换

    JSON解析器: 常见的解析器: Jsonlib, Gson, fastjson, jackson 其中应用最广泛的是jackson,阿里的fastjson虽然比jackson快一点,但存在的问题比较 ...

  2. maven项目中 把依赖包打进jar包

    在pom.xml文件中增加build配置 1 <build> 2 <plugins> 3 <plugin> 4 <artifactId>maven-as ...

  3. pycharm 在flask断点不停止

    For me disabling Gevent compatible option in Preferences > Build, Execution, Deployment has helpe ...

  4. part 36 AngularJS route reload

    In this video we will discuss angular route service reload() method. This method is useful when you ...

  5. MySQL基础语句(查询)

    students表 id class_id name gender score 1 1 小明 M 90 2 1 小红 F 95 3 1 小军 M 88 4 1 小米 F 73 5 2 小白 F 81 ...

  6. Linux基础三:用户和组

    三.用户和组 1.概念 (1).用户概念: 用户是用来运行某一些进程.拥有某一些文件或目录. 在Linux里面,用户分成三大类:root用户.系统用户.普通用户. 用户是用UID来唯一标识身份的,且r ...

  7. SubsamplingScaleImageView 源码解析

    一开始没打算分析 SubsamplingScaleImageView 这个开源的图片浏览器的,因为这个库在我们 App 中使用了,觉得自己对这个库还是比较熟悉的,结果某天再看看到源码介绍的时候,才发现 ...

  8. 洛谷 P2481 [SDOI2010]代码拍卖会(背包+隔板法)

    题面传送门 题意: 给出 \(n,p\),求有多少 \(n\) 位数 \(X=a_1a_2a_3\dots a_n\) 满足: 该 \(n\) 位数不含前导零 \(a_i \leq a_{i+1}\) ...

  9. DirectX12 3D 游戏开发与实战第十一章内容

    仅供个人学习使用,请勿转载.谢谢! 11.模板 模板缓冲区(stencil buffer)是一种"离屏"(off-screen)缓冲区,我们可以利用它来实现一些效果.模板缓冲区.后 ...

  10. Markdown 目录

    Markdown 目录 1. TOC TOC 全称为 Table of Content,自动列出全部标题. 用法: [toc] 在 Markdown 中,自动生成目录非常简单,只需要在恰当的位置添加 ...