html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!doctype html>
<html>
<head>
<style>
body {
background: #444;
padding: 40px;
}
</style>
</head>
<body>
<canvas id="nippon" width="200px" height="200px" style="background-color:#fff">
</canvas>
<script>
var canvas = document.getElementById("nippon");
var ctx = canvas.getContext("2d");
var radius = canvas.height / 2;
ctx.translate(radius, radius);
radius = radius * 0.70
drawJap();
function drawJap() {
ctx.arc(0, 0, radius, 0 , 2*Math.PI);
ctx.fillStyle = "red";
ctx.fill();
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
body {
}
Enter to Rename, Shift+Enter to Preview
js
js
1
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Запуск