1 Star 0 Fork 0

溪的那边/html

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
扇形加字.html 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
溪的那边 提交于 2018-06-10 14:44 +08:00 . html
<!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>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/wgc942/html.git
[email protected]:wgc942/html.git
wgc942
html
html
master

搜索帮助