<canvas id="cvs"></canvas>
<div class="ttt">
</div>
<script>
console.log("12345678910");
</script>
<div></div>
<style>
.ttt{
height: 105px;
width: 105px;
border: 1px solid #aaa;
background-color: #efefef;
}
</style>
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ... </head>
<body>
</body>
CSS
格式化
h1 { color : #f00; }
#cvs{
border: 1px solid #aaa;
}
body {
background: #333;
font-size: 15px;
}
JS
格式化
let cvs = document.getElementById("cvs");
cvs.width = 200;
cvs.height = 200;
let ctx = cvs.getContext("2d");
ctx.strokeStyle = "#f00";
let p = new Path2D("M10 10 L10 100 L100 100 L100 100 Z");
ctx.stroke(p)
console.log("789");//344