body { background: #111; text-align: center; } canvas { display: inline-block; max-width: 100%; max-height: 100%; } canvas:active { cursor: pointer; cursor: grabbing; }