作者:mobiledu2502889257 | 来源:互联网 | 2023-09-16 16:38
其中,内部的div个数不固定,外部的div宽度不固定!
11 个解决方案
top = window.top / 2 - div.height/2
具体JS 你自己写吧
top = window.height / 2 - div.height/2
窗体高度/2 - div总高度/2 = 外面的DIV的top位置 (居中位置)
http://www.4css.cn/bbs/viewthread.php?tid=20&highlight=center