找回密码
 注册账号

QQ登录

只需一步,快速开始

《泰拉瑞亚下载-1.4.2.3版》 泰拉瑞亚服务器 - MOD模组下载

入驻泰拉战网 新手指引 - 升级 - 师徒

泰拉瑞亚合成表 泰拉卡牌 - 泰拉江湖 - 泰拉刺客

联系泰拉开发组👈进入 积分市场 - 房产交易 - 水晶获取

查看: 2077|回复: 0

[CSS] 跳动文字纯动画源码

[复制链接]

262

主题

124

回帖

9

广播

业务站长

积分
166
泰拉
180
水晶
2
铜钥匙
0
银钥匙
0
金钥匙
0

【江湖新秀】【我是小土豪】【宝剑回鞘】【泰拉达人】【奥运选手】

发表于 2019-11-5 23:21:45 | 显示全部楼层 |阅读模式
  1.   /*CSS部分源码*/
  2. @keyframes style1 {
  3.   from, 20%, 53%, 80%, to {
  4.     animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  5.     transform: translate3d(0,0.5,0.1);
  6.   }
  7.   40%, 43% {
  8.     animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
  9.     transform: translate3d(0px, -35px, 0);
  10.   }
  11. }

  12. @keyframes style2 {
  13.   from {
  14.     transform: scale3d(1, 1, 1);
  15.   }
  16.   30% {
  17.     transform: scale3d(1.25, 0.75, 1);
  18.   }
  19.   40% {
  20.     transform: scale3d(0.75, 1.25, 1);
  21.   }
  22.   50% {
  23.     transform: scale3d(1.15, 0.85, 1);
  24.   }
  25.   65% {
  26.     transform: scale3d(.95, 1.05, 1);
  27.   }
  28.   75% {
  29.     transform: scale3d(1.05, .95, 1);
  30.   }
  31.   to {
  32.     transform: scale3d(1, 1, 1);
  33.   }
  34. }

  35. @keyframes style3 {
  36.   from {
  37.     transform: scale3d(1, 1, 1);
  38.   }
  39.   10%, 20% {
  40.     transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
  41.   }
  42.   30%, 50%, 70%, 90% {
  43.     transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
  44.   }
  45.   40%, 60%, 80% {
  46.     transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
  47.   }
  48.   to {
  49.     transform: scale3d(1, 1, 1);
  50.   }
  51. }

  52. @keyframes style4 {
  53.   from, 20%, 40%, 60%, 80%, to {
  54.       animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  55.     }
  56.     0% {
  57.       opacity: 0;
  58.       transform: scale3d(.3, .3, .3);
  59.     }
  60.     20% {
  61.       transform: scale3d(1.1, 1.1, 1.1);
  62.     }
  63.     40% {
  64.       transform: scale3d(.9, .9, .9);
  65.     }
  66.     60% {
  67.       opacity: 1;
  68.       transform: scale3d(1.03, 1.03, 1.03);
  69.     }
  70.     80% {
  71.       transform: scale3d(.97, .97, .97);
  72.     }
  73.     to {
  74.       opacity: 1;
  75.       transform: scale3d(1, 1, 1);
  76.     }
  77. }
复制代码

  1.   //将上面的代码做成文件 并引入HTML
  2. <link rel='stylesheet' href='animations.css'>
复制代码

  1.   //HTML里面的style代码
  2. <style type='text/css'>

  3. .is-animate.style1 > div { animation-name: style1; }

  4. .is-animate > div {
  5.   animation-duration: 1s;
  6.   animation-fill-mode: both;
  7.   animation-iteration-count: infinite;
  8. }

  9. .is-animate > div:nth-child(1) { animation-delay: 0.0s }
  10. .is-animate > div:nth-child(2) { animation-delay: 0.1s }
  11. .is-animate > div:nth-child(3) { animation-delay: 0.2s }
  12. .is-animate > div:nth-child(4) { animation-delay: 0.3s }
  13. .is-animate > div:nth-child(5) { animation-delay: 0.4s }
  14. .is-animate > div:nth-child(6) { animation-delay: 0.5s }

  15. </style>
复制代码

  1.   //HTML文件代码
  2. <div class='is-animate style1'>
  3.   <div>1</div>
  4.   <div>2</div>
  5.   <div>3</div>
  6.   <div>4</div>
  7.   <div>5</div>
  8.   <div>6</div>
  9. </div>
复制代码


大致的效果如下:
001.jpg

获得 大恶魔卡 一张

卡片说明:曲奇饼 被 [恐怖的魂魄妖梦] 袭击!逃跑时候掉落 34 泰拉.

卡片效果:损失 34 泰拉

慵懒~慵懒~
您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

QQ|友链申请|Archiver|手机版|小黑屋|游芯沙盒 ( 陕ICP备11006283号-1 )

GMT+8, 2024-5-16 02:30 , Processed in 0.108353 second(s), 39 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表