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

How to use SUM() in MySQL for calculated values -

ios - IBOutlet for image button not correctly referencing button after recreating outlet -

java - AEM: 403 Forbidden occurs when call a Post servlet -