• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    html5使用canvas绘制文字特效

    <canvas id="canvas" width="500" height="400" style="background-color: yellow;"></canvas>
     

    复制代码
    代码如下:

    var canvas=document.getElementById("canvas");
    var cxt=canvas.getContext("2d");
    cxt.font="40px 黑体";
    //绘制实心字
    cxt.fillStyle="red";//填充红色
    cxt.fillText("hello,思思博士",10,50);
    //绘制空心字
    cxt.strokeStyle="red";//红色边
    cxt.strokeText("hello,思思博士",10,100);

    上一篇:html5使用canvas绘制太阳系效果
    下一篇:24个canvas基础知识小结
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯

    时间:9:00-21:00 (节假日不休)

    地址:江苏信息产业基地11号楼四层

    《增值电信业务经营许可证》 苏B2-20120278

    html5使用canvas绘制文字特效 html5,使用,canvas,绘制,文字,