代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>扇形加字</title>
</head>
<body>
<canvas id="mycanvas1" width="1000" height="1000" style="border: 1px solid #d3d3d3;"></canvas>
<script type="text/javascript">
var c=document.getElementById('mycanvas1');
var ctx=c.getContext("2d");
var grd2=ctx.createLinearGradient(500,330,110,350,330,500);
grd2.addColorStop(0,"lightpink");
grd2.addColorStop(0.2,"aqua");
grd2.addColorStop(0.35,"greenyellow");
grd2.addColorStop(0.5,"tomato");
grd2.addColorStop(0.75,"palegreen");
grd2.addColorStop(0.9,"powderblue");
ctx.beginPath();
ctx.moveTo(350,510);
ctx.arc(350,510,300,Math.PI*7/6,Math.PI*1.8);
ctx.arc(350,510,110,Math.PI*1.8,Math.PI*7/6,true);
ctx.fillStyle=grd2;
ctx.fill();
ctx.closePath();
ctx.font="80px 华文彩云";
ctx.strokeStyle="aqua";
ctx.fillStyle="lightpink";
ctx.strokeText("追光者",220,138);
ctx.fillText("追光者",220,138);
ctx.beginPath();
ctx.arc(350,700,300,6*Math.PI*7/6,6*Math.PI*1.8);
ctx.arc(350,700,150,6*Math.PI*1.8,6*Math.PI*7/6,true);
ctx.fillStyle=grd2;
ctx.fill();
ctx.closePath();
ctx.font="50px 华文彩云";
ctx.strokeStyle="aqua";
ctx.fillStyle="lightpink";
ctx.strokeText("小学生放假啦",200,708);
ctx.fillText("小学生放假啦",200,708);
ctx.beginPath();
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。