Skip to content

Instantly share code, notes, and snippets.

@kahilkubilay
Created December 26, 2019 22:59
Show Gist options
  • Save kahilkubilay/f9e1e4197f25a1b7adbbdd36272594ad to your computer and use it in GitHub Desktop.
Save kahilkubilay/f9e1e4197f25a1b7adbbdd36272594ad to your computer and use it in GitHub Desktop.
Javascript İle Oyun Yapımı: Nesnelerin Kontrolü - Top
// ball elementi üzerinde işlemler
var ball = document.getElementById('ball');
ball.style.top = window.innerHeight/2 + 'px';
ball.style.left = (window.innerWidth/2) + (16/2) + 'px';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment