gpt4 book ai didi

html - 中间框可滚动的垂直布局(不是位置 : absolute)

转载 作者:行者123 更新时间:2023-11-28 03:33:25 25 4
gpt4 key购买 nike

我需要一些看起来很普通的东西:

+-----------+
| Header |
+-----------+
| ^|
| ||
| Scroll ||
| ||
| v|
+-----------+
| Footer |
+-----------+

但问题是,我的标题可以换行,因此它的高度可以改变。所以我不能使用 position: absolute 来布局页面和任何其他标题大小固定且已知的先验。我设计了一个 solution使用 display: table,但它在每个浏览器中看起来都不同,并且只能在 Chrome 中按预期工作。

我需要做什么才能使它适用于 FF 和 IE9?

link (working in chrome only)

图片顺序如下:FF, IE, Chrome (ok)

enter image description here

我的版本:FF (20.0.1), IE (9.0.8112.16421 64bit), Chrome (26.0.1410.64 m)

最佳答案

你想要overflow-y: scroll

工作示例:

Demo

关于html - 中间框可滚动的垂直布局(不是位置 : absolute),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16168449/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com