点击查看html编辑器说明文档

GMsAGaFedit icon

|
|
Fork(复制)
|
|
作者:
用户fkxIv10
提交反馈
嵌入
设置
下载
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ...
展开
</head>
<body>
<canvas id="cvs"></canvas>
<div class="ttt">

</div>

<script>
console.log("123456789");

</script>

<div></div>

<style>
.ttt{
   height: 105px;
   width: 105px; 
   border: 1px solid #aaa;
   background-color: #efefef;
}
</style>
</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
预览
控制台