中年程序员今天正式开启副业之旅!
研究了好几天,今天终于开张了,到目前为止收入4.5元
[html] 使用HTML5绘制一个IE的Logo
"<!DOCTYPE html>
<html>
<head>
<title>IE Logo</title>
<style>
canvas {
border: 1px solid black;
}
</style>
</head>
<body>
<canvas id=\"ie-logo\" width=\"200\" height=\"200\"></canvas>
<script>
const canvas = document.getElementById(\"ie-logo\");
const ctx = canvas.getContext(\"2d\");
// 绘制IE的蓝色背景
ctx.fillStyle = \"#007BFF\";
ctx.fillRect(0, 0, canvas.width, canvas.height);
// 绘制IE的黄色线条
ctx.beginPath();
ctx.lineWidth = 20;
ctx.strokeStyle = \"#FFB71B\";
ctx.moveTo(50, 100);
ctx.lineTo(100, 50);
ctx.lineTo(150, 100);
ctx.lineTo(100, 150);
ctx.closePath();
ctx.stroke();
// 绘制IE的蓝色圆圈
ctx.beginPath();
ctx.lineWidth = 10;
ctx.strokeStyle = \"#007BFF\";
ctx.arc(100, 100, 50, 0, 2 * Math.PI);
ctx.stroke();
// 绘制IE的蓝色小圆
ctx.fillStyle = \"#007BFF\";
ctx.beginPath();
ctx.arc(100, 100, 20, 0, 2 * Math.PI);
ctx.fill();
<
"<!DOCTYPE html>
<html>
<head>
<title>IE Logo</title>
<style>
canvas {
border: 1px solid black;
}
</style>
</head>
<body>
<canvas id=\"ie-logo\" width=\"200\" height=\"200\"></canvas>
<script>
const canvas = document.getElementById(\"ie-logo\");
const ctx = canvas.getContext(\"2d\");
// 绘制IE的蓝色背景
ctx.fillStyle = \"#007BFF\";
ctx.fillRect(0, 0, canvas.width, canvas.height);
// 绘制IE的黄色线条
ctx.beginPath();
ctx.lineWidth = 20;
ctx.strokeStyle = \"#FFB71B\";
ctx.moveTo(50, 100);
ctx.lineTo(100, 50);
ctx.lineTo(150, 100);
ctx.lineTo(100, 150);
ctx.closePath();
ctx.stroke();
// 绘制IE的蓝色圆圈
ctx.beginPath();
ctx.lineWidth = 10;
ctx.strokeStyle = \"#007BFF\";
ctx.arc(100, 100, 50, 0, 2 * Math.PI);
ctx.stroke();
// 绘制IE的蓝色小圆
ctx.fillStyle = \"#007BFF\";
ctx.beginPath();
ctx.arc(100, 100, 20, 0, 2 * Math.PI);
ctx.fill();
<
展开
1
点赞
![[吐舌]](http://lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_95.6b0752f.png)