<div class="ui-container">
<div>
<button id="button">リセット</button>
</div>
</div>
html, body {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #292a33;
overflow: hidden;
}
.ui-container {
position: absolute;
left: 10px;
top: 10px;
z-index: 1;
color: #f0f0f0;
}
function setup() {
createCanvas(windowWidth, windowHeight);
document.getElementById("button").onclick = () => {
clear();
};
}
function draw() {
circle(mouseX, mouseY, 10);
}
This Pen doesn't use any external CSS resources.