javascript - Center position of current screen position -


is there option find center position (top , left) of actual screen position?

my main goal show div in center of screen no matter scroll or click

you can use window attributes center coordinates in pure javascript:

var x = window.innerwidth / 2; var y = window.innerheight / 2; 

Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -