第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > 网页加载时样式效果css如何实现?(多种样式示例)

网页加载时样式效果css如何实现?(多种样式示例)

时间:2020-05-03 01:07:57

相关推荐

网页加载时样式效果css如何实现?(多种样式示例)

web前端|css教程

css加载动画代码

web前端-css教程

在web前端开发过程中,作为站长可能要考虑到,页面如果出现正在加载状态时该如何用css来展示等待加载的样式,一个好看的css网页加载动画可以减少用户等待过程中的乏味时刻。那么本篇文章就给大家介绍css加载中动画具体是如何实现的问题?

我爱冷笑话源码,vscode 汇编高亮,ubuntu gst,tomcat更新web,视频sqlite文件格式,鼠标拖动轮播图插件,前端面试框架聚焦吾爱破解,中国知网最新爬虫专利,php扫描工具,海外的seo优化,学历网站源码,导航网站网页模板下载地址,商艺设计 模板lzw

纯css代码实现页面加载中样式:

phonegap 项目源码,vscode从svn拉项目,ubuntu网卡vlan,如何刷新tomcat缓存,网络爬虫实习,php 遍历键值对,房地产seo优化效果,整容网站源代码,dede会员提示页模板lzw

A、条形波动样式的css加载动画代码示例如下:

易语言fps游戏挂机源码,ubuntu 替换桌面环境,tomcat最大连接数测试,淘宝爬虫定制网店,服务器执行php格式文件,领动seolzw

.spinner { margin: 100px auto; width: 50px; height: 60px; text-align: center; font-size: 10px;} .spinner > div { background-color: #67CF22; height: 100%; width: 6px; display: inline-block;-webkit-animation: stretchdelay 1.2s infinite ease-in-out; animation: stretchdelay 1.2s infinite ease-in-out;} .spinner .re2 { -webkit-animation-delay: -1.1s; animation-delay: -1.1s;} .spinner .re3 { -webkit-animation-delay: -1.0s; animation-delay: -1.0s;} .spinner .re4 { -webkit-animation-delay: -0.9s; animation-delay: -0.9s;} .spinner .re5 { -webkit-animation-delay: -0.8s; animation-delay: -0.8s;} @-webkit-keyframes stretchdelay { 0%, 40%, 100% { -webkit-transform: scaleY(0.4) } 20% { -webkit-transform: scaleY(1.0) }} @keyframes stretchdelay { 0%, 40%, 100% {transform: scaleY(0.4); -webkit-transform: scaleY(0.4); } 20% {transform: scaleY(1.0); -webkit-transform: scaleY(1.0); }}

代码效果如下图:

B、圆形循环样式的css加载中动画代码示例如下:

.container1 > div, .container2 > div, .container3 > div { width: 6px; height: 6px; background-color: #333; border-radius: 100%; position: absolute; -webkit-animation: bouncedelay 1.2s infinite ease-in-out; animation: bouncedelay 1.2s infinite ease-in-out; -webkit-animation-fill-mode: both; animation-fill-mode: both;} .spinner .spinner-container { position: absolute; width: 100%; height: 100%;} .container2 { -webkit-transform: rotateZ(45deg); transform: rotateZ(45deg);} .container3 { -webkit-transform: rotateZ(90deg); transform: rotateZ(90deg);} .circle1 { top: 0; left: 0; }.circle2 { top: 0; right: 0; }.circle3 { right: 0; bottom: 0; }.circle4 { left: 0; bottom: 0; } .container2 .circle1 { -webkit-animation-delay: -1.1s; animation-delay: -1.1s;} .container3 .circle1 { -webkit-animation-delay: -1.0s; animation-delay: -1.0s;} .container1 .circle2 { -webkit-animation-delay: -0.9s; animation-delay: -0.9s;} .container2 .circle2 { -webkit-animation-delay: -0.8s; animation-delay: -0.8s;} .container3 .circle2 { -webkit-animation-delay: -0.7s; animation-delay: -0.7s;} .container1 .circle3 { -webkit-animation-delay: -0.6s; animation-delay: -0.6s;} .container2 .circle3 { -webkit-animation-delay: -0.5s; animation-delay: -0.5s;} .container3 .circle3 { -webkit-animation-delay: -0.4s; animation-delay: -0.4s;} .container1 .circle4 { -webkit-animation-delay: -0.3s; animation-delay: -0.3s;} .container2 .circle4 { -webkit-animation-delay: -0.2s; animation-delay: -0.2s;} .container3 .circle4 { -webkit-animation-delay: -0.1s; animation-delay: -0.1s;} @-webkit-keyframes bouncedelay { 0%, 80%, 100% { -webkit-transform: scale(0.0) } 40% { -webkit-transform: scale(1.0) }} @keyframes bouncedelay { 0%, 80%, 100% {transform: scale(0.0); -webkit-transform: scale(0.0); } 40% {transform: scale(1.0); -webkit-transform: scale(1.0); }}

效果如下图:

C、圆点横向波动样式的css加载动画实现代码示例如下:

.spinner > div { width: 30px; height: 30px; background-color: #67CF22; border-radius: 100%; display: inline-block; -webkit-animation: bouncedelay 1.4s infinite ease-in-out; animation: bouncedelay 1.4s infinite ease-in-out; /* Prevent first frame from flickering when animation starts */ -webkit-animation-fill-mode: both; animation-fill-mode: both;} .spinner .bounce1 { -webkit-animation-delay: -0.32s; animation-delay: -0.32s;} .spinner .bounce2 { -webkit-animation-delay: -0.16s; animation-delay: -0.16s;} @-webkit-keyframes bouncedelay { 0%, 80%, 100% { -webkit-transform: scale(0.0) } 40% { -webkit-transform: scale(1.0) }} @keyframes bouncedelay { 0%, 80%, 100% {transform: scale(0.0); -webkit-transform: scale(0.0); } 40% {transform: scale(1.0); -webkit-transform: scale(1.0); }}

效果如下图:

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。