モーダルの位置を調整する(リサイズ可)
function resize() { var modal_content =document.querySelector(".modal_content"); var contenttop = ( window.innerHeight - modal_content.offsetHeight)/2; (contenttop > 0 )? modal_content.style.top=contenttop+"px":modal_content.style.top=0+"px"; } resize(); window.onresize = resize;