zoukankan      html  css  js  c++  java
  • 与其放在电脑里占内存,还不如拿出来帮助一群小白白之html篇之三

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title></title>
    <style>
    body {
    margin:0px;
    padding:0px;
    }
    #aa{
    border:1px solid blanchedalmond;
    background-color:blue;
    }
    </style>
    <script>
    window.onload =function(){
    var canvas=document.getElementById("aa");
    var context =canvas.getContext ("2d");
    context.beginPath();
    context.moveTo (200,canvas.height/2)
    context.lineTo (canvas.width-200,canvas.height /2);
    context.lineWidth =20;
    context.strokeStyle ="#ff00000";
    context.lineCap ="round";
    context.stroke ();

    context.beginPath();
    context.moveTo (200,canvas.height/2+50)
    context.lineTo (canvas.width-200,canvas.height /2);
    context.lineWidth =20;
    context.strokeStyle ="#ff00000";
    context.lineCap ="square";
    context.stroke ();
    };

    </script>
    </head>
    <body>
    <canvas id="aa" width="578" height="200">

    </canvas>
    </body>
    </html>

    何以飘零去,何以少团栾,何以离别久,何以不得安。
  • 相关阅读:
    Java后端知识体系
    HashMap底层实现整理
    Java线程池
    Spring Boot+Dubbo 入门
    Go 代码记录(一)
    Servlet 复习
    Spring Cloud(二)Eureka:服务注册与发现
    Spring Cloud (一)概述
    数据结构基础知识
    容器技术-Docker入门
  • 原文地址:https://www.cnblogs.com/mikou2017/p/6883219.html
Copyright © 2011-2022 走看看