• canvas画蜗牛


    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta name="Generator" content="EditPlus®">
    <meta name="Author" content="">
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <title>Document</title>
    </head>
    <body onload="draw()">
    <canvas id="canvas" width="500" height="500"></canvas>
    </body>
    <script>
    function draw(){
    var canvas=document.getElementById("canvas");
    if(canvas==null)
    {return false;}

    var context=canvas.getContext("2d");

    context.fillStyle="#eeeeef";
    context.fillRect(0,0,500,500);
    context.translate(200,50);
    context.fillStyle="rgba(255,0,0,0.25)";
    for(var i=0;i<50;i++)
    {
    context.translate(25,25);
    context.scale(0.95,0.95);
    context.rotate(Math.PI/10);
    context.fillRect(0,0,100,50);
    }
    //g1=context.createRadialGradient(0,0,20,200,200,80);
    //g1.addColorStop(0,"rgb(255,255,0)");
    // g1.addColorStop(0.3,"rgb(234,67,98)");
    //g1.addColorStop(1,"rgb(89,67,98)");
    //context.fillStyle=g1;
    //context.fillRect(0,0,300,300);
    }
    </script>
    </html>

  • 相关阅读:
    在linux服务器上搭建nvidia-docker环境
    Mysql入门
    POSTMAN关联
    SQL之内连接与外连接
    JMeter线程组参数含义
    JMeter基本概念
    JMeter聚合报告参数含义
    JMeter录制脚本
    Mysql日期与时间类型及函数
    linux服务器上安装mysql
  • 原文地址:https://www.cnblogs.com/qiuchunxia/p/5815224.html
Copyright © 2020-2023  润新知