css实现项目中的加载动画


// =========================================第一个动画
<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实现项目中的加载动画的更多相关文章
- android项目中如何加载已有so库 <转>
1,在项目根目录下建立文件夹libs/armeabi文件夹 2,将so库放入 libs/armeabi文件夹 注意事项: 1,如果采用静态注册的方式请注意C文件中严格按照命名规则 Java_packa ...
- web项目中js加载慢问题解决思路
最近使用Echarts地图(版本为echarts2,echarts3目前无法下载地图版). 问题描述:之前使用require形式加载,地图首次加载显示要6-7秒,难以接受. js配置代码如下: < ...
- mvvm模式下在WPF项目中动态加载项目的程序集和类
在mvvm模式的wpf项目中有个需求需要去加载解决方案的程序集,并且根据程序集去动态加载当前程序集的类,做成下拉框形式. 效果: //全局定义 private ComboBox abList= nul ...
- 网页图表Highcharts实践教程之标签组与加载动画
网页图表Highcharts实践教程之标签组与加载动画 Highcharts标签组 在图表的大部分元素都提供了标签功能.但非常多时候,我们须要额外说明一些信息.这个时候借助原有的图表元素的标签功能就 ...
- 为网格布局图片打造的超炫 CSS 加载动画
今天,我想与大家分享一些专门为网格布局的图像制作的很酷的 CSS 加载动画效果.您可以把这些效果用在你的作品集,博客或任何你想要的网页中.设置很简单.我们使用了下面这些工具库来实现这个效果: Norm ...
- CSS 实现加载动画之一-菊花旋转
最近打算整理几个动画样式,最常见的就是我们用到的加载动画.加载动画的效果处理的好,会给页面带来画龙点睛的作用,而使用户愿意去等待.而页面中最常用的做法是把动画做成gif格式,当做背景图或是img标签来 ...
- CSS 实现加载动画之七-彩环旋转
今天整理的这个动画估计大家都不会陌生,彩环旋转,看过之后是不是觉得很熟悉,对,这个就是优酷视频APP里面的加载动画.本人空余时间喜欢看些视频,留意到这个动画后就想用代码实现出来,今天整理了下,跟大家分 ...
- CSS 实现加载动画之六-大风车
这个动画改编自光盘旋转,前几个步骤一样,最后一步不同.光盘旋转的最后一步是外层容器加个圆形的白色边框,多余部分隐藏,这个案例则是在每个旋转的子元素的顶部或底部增加一个三角形的元素,构成风车旋转的角. ...
- CSS 实现加载动画之五-光盘旋转
今天做的这个动画叫光盘旋转,名字自己取的.动画的效果估计很多人都很熟悉,就是微信朋友圈里的加载动画.做过前面几个动画,发现其实都一个原理,就是如何将动画的元素如何分离出来.这个动画的实现也很简单,关键 ...
随机推荐
- PTA二叉搜索树的操作集 (30分)
PTA二叉搜索树的操作集 (30分) 本题要求实现给定二叉搜索树的5种常用操作. 函数接口定义: BinTree Insert( BinTree BST, ElementType X ); BinTr ...
- SpringBoot 整合 Mybatis-Plus + Mysql
mybatis-plus是mybatis的一款插件,它的主要作用是快速开发,省略mybatis的配置,具体的功能请参照官网. 开发环境: springboot,maven,mybatis-plus,m ...
- 简单的SQl时间序列生成,每次时间间隔10分钟。
create table #timeseries(Times datetime not null) go declare @firstdate datetime , @lastdate datetim ...
- selenium的 元素定位、元素信息、交互
selenium的元素定位? 元素定位:自动化要做的就是模拟鼠标和键盘来操作来操作这些元素,点击.输入等等.操作这些元素前首先 要找到它们,WebDriver提供很多定位元素的方法 方法: 1.fin ...
- JS中bind、call和apply的作用以及在TS装饰器中的用法
目录 1,前言 1,call 1.1,例子 1.2,直接调用 1.3,将this指向另一个对象 1.4,传递参数 2,apply 2.1,例子 2.2,直接调用 2.3,将this指向另一个对象 2. ...
- rocketmq 精华
(ps:)通过本人语雀文档阅读体验更好哦--有目录 介绍 rocket mq 翻译成中文就是火箭消息队列,从名字就可以看出来,它是一个很快的消息队列... rocket mq 是 阿里巴巴研制的后面贡 ...
- java8特性表达式
public static void main(String[] args) { JFrame jframe = new JFrame("My JFrame"); JButton ...
- idea创建 springboot工程(支持jsp)
以前学springboot以前想搭建一个支持jsp的项目一直弄不上,现在发现用maven创建一个项目然后改成springboot效果一样的 https://blog.csdn.net/gisboygo ...
- Windows快捷键及cmd打开方式
Windows快捷键 win+e 打开我的电脑 win+r 打开运行 ctrl+z 撤销 shift+del 彻底删除 alt+F4 关闭窗口 ctrl+c 复制 ctrl+a 全选 ctrl+x 剪 ...
- GoF23种(部分)软件设计模式【核心理解】
设计模式复习 1. 面向对象设计原则 1.1 可维护性较低的软件设计 过于僵硬 过于脆弱 复用率低 黏度过高 1.2 一个好的系统设计 可扩展性 灵活性 可插入性 复用:一个软件的组成部分可以在同一个 ...