Skip to content

Instantly share code, notes, and snippets.

@tompng
Created December 2, 2019 04:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tompng/0dee6ac4b510697ddc79ba5359979aaa to your computer and use it in GitHub Desktop.
Save tompng/0dee6ac4b510697ddc79ba5359979aaa to your computer and use it in GitHub Desktop.
Mac Chrome 外付マウスをつけた時だけ表示が荒ぶる
<style>
body { margin:0; }
canvas { box-shadow:0 0 4px inset; width:100%; }
div { position:fixed; left: 50%; animation: rotate 1s linear infinite; }
@keyframes rotate { 100% { transform:rotate(360deg); } }
</style>
<div>a</div>
<canvas>
<script>
const canvas = document.querySelector('canvas')
canvas.width = innerWidth
canvas.height = innerHeight + 2
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment