經安全檢測,此網站為安全網站,請放心前往原始網址!

html - Using jQuery to center a DIV on the screen - Stack Overflow

How do I go about setting a in the center of the screen using jQuery? ... I put a jquery plugin here http://plugins.jquery.com/project/autocenter VERY SHORT VERSION $('#myDiv').css({top:'50%',left:'50%',margin:'-'+($('#myDiv').height() / 2)+'px 0 0 -'+($

stackoverflow.com

網址安全性掃描由 google 提供