屏幕中心的中心位置 [英] Center site in the center of the screen
本文介绍了屏幕中心的中心位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将整个网站居中放在屏幕中央?
How can I center the whole site in the center of the screen?
水平和垂直都可以;
这是该站点,请注意,该站点现在水平,垂直居中丢失(任何分辨率)
This is the site, see that it is centered horizontally, vertically now missing (any resolution)
可以随意在此链接。
推荐答案
#container {
width: 400px;
height: 400px;
position: absolute;
top: 50%;
left: 50%;
margin: -200px auto auto -200px;
}
jsFiddle 。
这篇关于屏幕中心的中心位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文