<canvas id='snow'></canvas>
html, body {
background: #2c3e50;
}
canvas {
position: absolute;
top: 0;
left: 0;
}
var canvas = document.getElementById('snow');
var ctx = canvas.getContext('2d');
var w = canvas.width = window.innerWidth;
var h = canvas.height = window.innerHeight;
ctx.clearRect(0, 0, w, h);
ctx.beginPath();
var long = w;
var cx = w / 2;
var cy = h / 2;
ctx.fillStyle = "white";
ctx.strokeStyle = "white";
ctx.arc(cx, cy, long / 15, 0, 2 * Math.PI);
for (i = 0; i < 6; i++) {
ctx.moveTo(cx, cy);
ctx.lineWidth = long / 20;
ctx.lineTo(cx + long / 2 * Math.sin(i * 60 / 180 * Math.PI),
cy + long / 2 * Math.cos(i * 60 / 180 * Math.PI));
}
ctx.fill();
ctx.stroke();
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.