js实现文字转gif动画代码

代码语言:html

所属分类:动画

代码描述:js实现文字转gif动画代码

代码标签: js 文字 gif 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">

  
  
<style>
body {background: #333}
</style>



</head>

<body >
  <center>
<canvas style="visibility:hidden;position:absolute" width="421" height="150"></canvas>
<textarea cols="50" rows="5">
Tutorial Blog for Stylish Blogger
</textarea><br />
<input type="button" onclick="kaki()"  value="Create GIF" />
<div id="tes"></div>
<img></img><br />
</center>
  
  
      <script>
//Original source: https://jsdo.it/jagarikin/UGE2

var canvas,ctx,nowbit,nowpin,ho,stp;

canvas = document.getElementsByTagName('canvas')[0];
ctx = canvas.getContext('2d');
    canvas.style.width = width + 'px';
    canvas.style.height = height + 'px';
ctx.fillRect(0,0,canvas.width,canvas.height);

function kaki(){
    var a,b,c;
    ctx.font="140px Beben Koben";
    ho=[];
    a=document..........完整代码请登录后点击上方下载按钮下载查看

网友评论0