canvas简易手写画板签名板效果-移动端手机版

代码语言:html

所属分类:其他

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

<!DOCTYPE html>
<html lang="en"><head>    
<meta charset="UTF-8">    
<title>Canvas实现简易涂鸦板签名板-移动版</title>
</head>
<body>
    <h1>请在手机上预览</h1>
    <canvas id="canvas" width="500" height="500" style="box-shadow:0 5px 40px black;background-color: rgba(0,0,0,0.1)"></canvas>
    <script>    
          canvas = document.getElementById('canvas');    
          if(canvas.getContext){        
                context = canvas.getContext('2d');    
           }   
       context.lineWidth = 5;    
      context.strokeStyle = '#0000ff';    
      canvas.addEventListener('touchstart',touchstart);    
      funct.........完整代码请登录后点击上方下载按钮下载查看

网友评论0