将中心 div 重叠在两个背景 div 上?
嘿,伙计们,这可能是一个难解的问题,但我想要两个不同颜色的 div 垂直对齐背景,它们的宽度为 100%,高度为任意值,为了简单起见,我们会说 300px。然后我想将一个与其他两个 div 重叠的 div 居中。有什么建议吗?干杯
Hey guys probably a n00b question but I want to have two different color divs vertically aligned for the background with their widths being 100% and height being whatever, we'll say 300px for simplicity sake. I then want to center a div which overlaps the other two divs. Any advice? Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像这样的东西吗?您没有提供任何规范,因此很难判断哪些属性可以硬编码,哪些属性不能。但这应该让你开始。
http://jsfiddle.net/PWwQM/1/
Something like this? You didn't provide any specs so its hard to tell what attributes can be hard coded and which cannot. But this should get you started.
http://jsfiddle.net/PWwQM/1/