乱码乱a∨中文字幕,在线免费激情视频,亚洲欧美久久夜夜潮,国产在线网址

  1. <sub id="hjl7n"></sub>

    1. <sub id="hjl7n"></sub>

      <legend id="hjl7n"></legend>

      當(dāng)前位置:首頁 >  站長 >  編程技術(shù) >  正文

      js+canvas實現(xiàn)畫板功能

       2020-11-10 14:07  來源: 腳本之家   我來投稿 撤稿糾錯

        阿里云優(yōu)惠券 先領(lǐng)券再下單

      這篇文章主要為大家詳細介紹了js+canvas實現(xiàn)畫板功能,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下

      本文實例為大家分享了js+canvas實現(xiàn)畫板功能的具體代碼,供大家參考,具體內(nèi)容如下

      1.實現(xiàn)了畫圖,改變畫筆粗細,改變畫筆顏色,清屏功能

      <!DOCTYPE html>
      <html>
       <head>
       <meta charset="utf-8" />
       <title>畫板</title>
       <link rel="shortcut icon" type="image/x-icon" href="img/an.ico" />
       <link rel="stylesheet" type="text/css" href="css/drow.css" />
       </head>
       <body>
       <canvas id="mycanvas" width="1100px" height="660px"></canvas>
       <div class="tool">
        畫筆顏色:<input type="color" name="color1" id="color1"/><br />
        畫筆粗細:<input type="range" name="range1" id="range1"min="1" max="20"/><br />
        <button class="btn">清屏</button>
       </div>
       </body>
       <script src="js/drow.js" type="text/javascript" charset="utf-8"></script>
      </html>

      *{
       margin: 0;
       padding: 0;
       text-align: left;
       -moz-user-select: none;
       -ms-user-select: none;
       -webkit-user-select: none;
      }
      #mycanvas{
       border: 2px solid deepskyblue;
      }
      .tool{
       width: 260px;
       height: 100%;
       position: fixed;
       right: 0;
       top: 0;
       background-color: #CCCCCC;
      }

      *{
       margin: 0;
       padding: 0;
       text-align: left;
       -moz-user-select: none;
       -ms-user-select: none;
       -webkit-user-select: none;
      }
      #mycanvas{
       border: 2px solid deepskyblue;
      }
      .tool{
       width: 260px;
       height: 100%;
       position: fixed;
       right: 0;
       top: 0;
       background-color: #CCCCCC;
      }

      以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

      來源:腳本之家

      鏈接:https://www.jb51.net/article/195520.htm

      申請創(chuàng)業(yè)報道,分享創(chuàng)業(yè)好點子。點擊此處,共同探討創(chuàng)業(yè)新機遇!

      相關(guān)文章

      熱門排行

      信息推薦