快速使用Romanysoft LAB的技术实现 HTML 开发Mac OS App,并销售到苹果应用商店中。
 
《HTML开发Mac OS App 视频教程》
 
官方QQ群:(申请加入,说是我推荐的
  • App实践出真知 434558944       
  • App学习交流 452180823          
 
简要教程

这是一款非常有创意的纯CSS3 loading加载文字动画特效。该loading文字特效中,字母O的内圆会不停的放大缩小,使用这个动画效果来提示用户当前的页面或任务正在加载中。

使用方法

HTML结构

该loading文字特效的HTML结构中,不动画的文字使用<span>来制作,动画的文字使用一个三层嵌套的<div>来制作。

<div id = "cupcake" class = "box">
    <span class = "letter">L</span>
    <div class = "cupcakeCircle box">
    <div class = "cupcakeInner box">
        <div class = "cupcakeCore box"></div>
    </div></div>
    <span class = "letter box">A</span>
    <span class = "letter box">D</span>
    <span class = "letter box">I</span>
    <span class = "letter box">N</span>
    <span class = "letter box">G</span>
</div>               
CSS样式

这个loading特效中的布局使用的是flex布局方式。IE11以下的浏览器都不支持CSS flex属性,所以布局会非常混乱。

#cupcake{
  flex-direction:row;
  -webkit-flex-direction:row;
  -ms-flex-direction:row;
  -mos-flex-direction:row;
  -o-flex-direction:row;
  justify-content:center;
  -webkit-justify-content:center;
  -ms-justify-content:center;
  height:100%;
  width:100%;
  background-color:#FFD454;   
}
.letter{
    font-size:100px;
    color:#222;
    font-family:tahoma;
}
 
.box{
    display: box;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
}
 
.cupcakeCircle, .cupcakeInner, .cupcakeCore{
     border-radius:50%;
    -webkit-border-radius:50%;
    -moz-border-radius:50%;
    -ms-border-radius:50%;
}
 
.cupcake, .letter, .cupcakeCircle, .cupcakeInner, .cupcakeCore{
    flex:none;
    -webkit-flex:none;
    -moz-flex:none;
    -ms-flex:none;
    -o-flex:none;
}
 
.letter, .cupcakeCircle{
    align-self:center;
    -webkit-align-self:center;
    -moz-align-self:center;
    -o-align-self:center;
    -ms-align-self:center;
}
.cupcakeCircle{
    align-items:center;
    -ms-align-items:center;
    justify-content:center;
    -ms-justify-content:center;
    height:100px;
    width:100px;
    background-color:#222;
}             

字母的动画使用的是CSS animation来制作。动画被设置为无线循环,并使用ease-in-out的easing效果。

.cupcakeInner{
      align-self:center;
      -ms-align-self:center;
      justify-content:center;
      -ms-justify-content:center;
      height:50%;
      width:50%;
      background-color:#FFD454;
 
      animation-name:cupcakeAnimate;
      animation-duration:500ms;
      animation-direction:alternate;
      animation-timing-function:ease-in-out;
      animation-iteration-count:infinite;
 
      -webkit-animation-name:cupcakeAnimate;
      -webkit-animation-duration:500ms;
      -webkit-animation-direction:alternate;
      -webkit-animation-timing-function:ease-in-out;
      -webkit-animation-iteration-count:infinite;
       
  }
  .cupcakeCore{
      align-self:center;
      -ms-align-self:center;
      height:25%;
      width:25%;
      background-color:#222;
      animation-name:coreAnimate;
      animation-duration:1s;
      animation-direction:alternate;
      animation-timing-function:ease-in-out;
      animation-iteration-count:infinite;
      -webkit-animation-name:coreAnimate;
      -webkit-animation-duration:1s;
      -webkit-animation-direction:alternate;
      -webkit-animation-timing-function:ease-in-out;
      -webkit-animation-iteration-count:infinite;
  }
 
  @-webkit-keyframes cupcakeAnimate{
          to{ height:90%; width:90%; }
  }
  @keyframes cupcakeAnimate{
      to{ height:90%; width:90%; }
  }
 
  @-webkit-keyframes coreAnimate{
      to{ height:90%; width:90%; }
  }
  @keyframes coreAnimate{
      to{ height:90%; width:90%; }
  

纯CSS3创意loading文字特效的更多相关文章

  1. 纯css3实现的文字亮光特效

    今天给大家分享一款纯css3实现的文字亮光特效.这款特效文字上一道亮光逐渐扫过文字.效果非常漂亮.一起看下效果: 在线预览   源码下载 实现的代码. html代码: <span class=& ...

  2. 创意HTML5文字特效 类似翻页的效果

    原文:创意HTML5文字特效 类似翻页的效果 之前在网上看到一款比较有新意的HTML5文字特效,文字效果是当鼠标滑过是出现翻开折叠的效果,类似书本翻页.于是我兴致勃勃的点开源码看了一下,发现其实实现也 ...

  3. 纯CSS3实现图片展示特效

    本文中要实现的一个纯CSS3的图片展示特效,以前只能用JavaScript实现,可想而知会受到多方面的限制,特别是性能.而今天我们将用简单的CSS3代码实现,你会发现它的动画效果在现代浏览器的帮助下无 ...

  4. 纯CSS3实现loading正在加载。。。

    场景分析:随着我司专职前端切图人员离职,切图的活重新落到我们小组团队成员的日常任务list里面,加上我们小组 7个前端 基本都是后台转的前端 (赶鸭子上架 前端现在需求量大 没办法) 加上自己也将就一 ...

  5. CSS3实现Loading动画特效

    查看效果:http://hovertree.com/texiao/css3/43/ 代码如下: <!DOCTYPE html> <html> <head> < ...

  6. 纯CSS3手风琴图片滑动特效

    要求 必备知识 基本了解CSS语法,初步了解CSS3语法知识. 开发环境 Adobe Dreamweaver CS6/Chrome浏览器 演示地址 演示地址 制作CSS3制作手风琴图片滑动效果,我们仅 ...

  7. 纯css3 transforms 3D文字翻开翻转3D开放式效果

    详细内容请点击 在线预览立即下载 在本教程中,将基于CSS3创建的一个实现一个有趣的3D开放式效果.教程的目的是展示我们如何能带来一些生活上使用CSS3 . html: <ul class=&q ...

  8. 38.纯 CSS 创作阶梯文字特效

    原文地址:https://segmentfault.com/a/1190000015107942 HTML code: <div class="container"> ...

  9. 如何用纯 CSS 创作阶梯文字特效

    效果预览 在线演示 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/MXYBEM 可交互视频教 ...

随机推荐

  1. 【u115】&&【t031】 01迷宫

    01迷宫(maze01) Time Limit: 1 second Memory Limit: 128 MB [问题描述] 有一个仅由数字0与1组成的n×n格迷宫.若你位于一格0上,那么你可以移动到相 ...

  2. Eclipse迅速执行:Exception in thread &quot;main&quot; java.lang.OutOfMemoryError: Java heap space

    问题叙述性说明: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space 问题原因: 程序中对 ...

  3. 【14.94%】【codeforces 611E】New Year and Three Musketeers

    time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...

  4. Qt5信号与槽C++11风格连接简介

    最近在论坛上看到了这个方面的问题,详见这里. 随后浅浅地学习了一下子,看到了Qt官方论坛上给出的说明,觉得C++11的functional连接方法还是比Qt4既有的宏连接方法有很大不同. 官方论坛的文 ...

  5. 华为软件开发云(DevCloud):免费可商用的项目管理工具

    在软件开发技术和理念层出不穷的今天,如何更快的适应变化的环境,更好的满足客户的需求,已经成为决定从小到大各种规模企业能否活下去的关键. 天下武功唯快不破,在当今大环境中更是如此,微服务,敏捷开发,新的 ...

  6. Linux 网络编程——TCP

    环境:Linux  C   一.协议介绍      TCP是面向连接的协议,提供可靠的数据传输:TCP协议的可靠传输基于三次握手.四次挥手以及确认重传机制实现.下面来具体展示下TCP的三次握手.四次挥 ...

  7. 机器审核图片学习(1)pornDetector

    a) https://github.com/bakwc/PornDetector 封装了两个库,opencv与scikit-learn 另外一种法师封装了opencv与tensorflow

  8. JieBaNet+Lucene.Net

    基于JieBaNet+Lucene.Net实现全文搜索   实现效果: 上一篇文章有附全文搜索结果的设计图,下面截一张开发完成上线后的实图: 基本风格是模仿的百度搜索结果,绿色的分页略显小清新. 目前 ...

  9. 简明Python3教程 3.介绍

    介绍 Python是少有的几种既强大又简单的编程语言.你将惊喜地发现通过使用Python即可轻松专注于解决问题而非和你所用的语言格式与结构. 下面是Python的官方介绍: Python is an ...

  10. ASP.NET Core Identity 配置 - ASP.NET Core 基础教程 - 简单教程,简单编程

    原文:ASP.NET Core Identity 配置 - ASP.NET Core 基础教程 - 简单教程,简单编程 ASP.NET Core Identity 配置 上一章节我们简单介绍了下 Id ...