typewriter.js代码打印机效果

所属分类:其他-动画效果,杂项

 31532  389  查看评论 (2)
分享到微信朋友圈
X
typewriter.js代码打印机效果 ie兼容10

简单使用方法

1、引用typewriter.js。

2、所要打字效果的html代码

<div id="code"> <span class="comments">/**</span><br />
      <span class="space"/><span class="comments">* We are both XXX Unversity  business administration and programmers,</span><br />
      <span class="space"/><span class="comments">* so I write some code to show my love to you.</span><br />
      <span class="space"/><span class="comments">*/</span><br />
      Boy i = <span class="keyword">new</span> Boy(<span class="string">"boyname"</span>);<br />
      Girl u = <span class="keyword">new</span> Girl(<span class="string">"girlname"</span>);<br />
      <span class="comments">// April 28, 2012, I told you I love you. </span><br />
      i.love(u);<br />
      <span class="comments">// but..., what you said that meaning we are still good friends.</span><br />
      u.sayOtherthing();<br />
      <span class="comments">// Since then, I ask you for the reason.</span><br />
      <span class="keyword">var</span> reason=i.ask(u);<br />
      <span class="comments">// you say we were not understand enough for each other .</span><br />
      $("body").append(reason);<br />
      <span class="comments">// You say that it is too quickily to turn our relation of lover.</span><br />
      <span class="comments">// And take care of u and our love.</span><br />
      i.takeCareOf(u);<br />
      <span class="comments">// So I keep waiting and I have confidence that you will.</span><br />
      <span class="keyword">boolean</span> isAccept = <span class="keyword">false</span>;<br />
      <span class="keyword">while</span> (isAccept) {<br />
      <span class="placeholder"/>i.waitFor(u);<br />
      <span class="placeholder"/><span class="comments">// I think it is an important decision</span><br />
      <span class="placeholder"/><span class="comments">// and you should forgot the unhappy things that happended before.</span><br />
      <span class="placeholder"/>isAccept = u.thinkOver();<br />
      }<br />
      <span class="comments">// After a please sound of accept, we will live happily ever after.</span><br />
      u.accept(i);<br />
      i.liveHappilyWith(u);<br />
  </div>

3、js调用方法

document.getElementById("code").typewriter();


相关插件-动画效果,杂项

文字插件特效_文字动画特效js插件

此插件是针对文字写的一个动画插件,主要可运用在开场和出场的时候,插件方便小巧,只需要配置参数即可达到数十种动画效果
  动画效果
 60010  856

html5制作雪花效果

html5制作雪花效果
  动画效果
 41491  371

用纯CSS3制作的效果非常炫酷的元素边框线条动画特效

这是一款使用纯CSS3制作的效果非常炫酷的元素边框线条动画特效。这个元素边框线条动画使用伪元素和keyframes来制作线条运动效果。
  动画效果
 240207  621

支持小数,从零开始的翻牌器

jQuery数字滚动,支持小数,从零开始的翻牌器,
  动画效果
 23230  242

讨论这个项目(2)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    0
    2017/7/25 15:19:08
    fantasmic 0
    2016/9/5 15:09:19
    while (isAccept)这句有问题,也可能就是这么霸道。 回复
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复