作者cgcat (小绵羊赶集)
看板Web_Design
标题[问题] 如何在full screen的页面上增加置中div
时间Fri Jul 18 17:18:49 2014
想利用这个full screen的效果
http://www.jq22.com/Demo462
然後在图片的上一层加上一个width:1000px置中的div
如果用position:fixed就不能用margin:auto来达到置中的效果
请问还有什麽办法可以解吗?
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 59.124.108.82
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/Web_Design/M.1405675134.A.34E.html
1F:推 qazwsx9006:position:fixed; margin-left:-500px; left:50%; 07/18 17:25
2F:→ qazwsx9006:不知道这样写可不可以... 07/18 17:26
3F:→ leochen0818:为什麽需要fixed? 07/18 17:47
4F:→ leochen0818:条件不足,不懂你想要的是甚麽@@ 07/18 17:49
5F:→ fire231:width:1000px position: absolute; top:50%; left:50% 07/19 15:23
6F:→ fire231:margin-left: -500px; 07/19 15:23