CSS 列高度不继承
我正在尝试得到这个... http://jsfiddle.net/K2NPz/1/
变成... http://postimage.org/image/1zjcktz2c/
左图为当前,右边是 理想的。我似乎无法让它工作,因为继承属性(和 100%)实际上没有做任何事情。它确实在 Quirks 模式下工作,但我需要它与实际的 Doctype(HTML5 或 XHTML 1.0 Strict)一起工作。
I'm trying to get this... http://jsfiddle.net/K2NPz/1/
Turned into... http://postimage.org/image/1zjcktz2c/
The left picture is current, the right is ideal. I can't seem to get it working though since the inherit property (and the 100%) aren't actually doing anything. It DOES work in Quirks mode, but I need it working with an actual realistic Doctype (HTML5 or XHTML 1.0 Strict).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
height:100%
表示父元素的 100%,但renderzone
div 没有指定高度。根据W3C的规范,当“height:100 %”...围绕“auto”的逻辑相当复杂,因此我无法给您如何使用它的答案,但我可以通过设置所有父容器(包括“body”)来获得与您想要的类似的东西& "html") 到
height:100%
按照 这个文档。它需要调整,但应该能让你走上正确的方向。height:100%
means 100% of the parent element, but therenderzone
div has no height specified. According to the W3C's specifications, when "height:100%" ...The logic surrounding "auto" is considerably complex, so I can't give you an answer for how to work with that, but I am able to get something similar to what you want by setting all of the parent containers (including "body" & "html") to
height:100%
as suggested by this document. It will need tweaking, but should set you in the right direction.