html溢出不显示,html – CSS高度100%溢出:自动不显示所有嵌套内容

本文描述了一个单页HTML应用程序中仅允许一个窗格具有可滚动内容的问题。作者尝试多种方法仍无法正常滚动到底部,提供了示例代码及样式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

基本上我有一个单页

HTML应用程序,其中包含所有固定位置,我只希望一个窗格具有可滚动内容.一切都按预期工作,但我无法滚动到内部容器容器的底部.我已经尝试将所有东西都移到abs pos,我已经尝试了所有我能够找到的解决方案,但是没有骰子.这是一个小提琴(

http://jsfiddle.net/yhhjL/),这里是我的标记和CSS的粗略模拟:

HTML

Company

FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
FirstSecondThirdFourth
LastLastLastLast

CSS

body {

margin:0;

padding: 0

}

header {

width: 100%;

height: 50px;

position: fixed;

background: black;

color: white;

}

.fixed-row-one {

width: 100%;

height: 50px;

position: fixed;

top: 50px;

background: #AAA;

color: white;

}

.fixed-row-two {

width: 100%;

height: 50px;

position: fixed;

top: 100px;

background: #e51837;

color: white;

}

.fixed-stage-left {

width: 50%;

height: 100%;

position: fixed;

overflow: hidden;

top: 150px;

left: 0;

background: #f1f1f1;

color: #000;

}

.scrollable {

width: 100%;

height: 100%;

background: #262626;

overflow: auto;

position: absolute;

}

.scrollable table tr{

width: 100%;

height: 50px;

color: white;

border-bottom: 1px solid #CCC;

}

.fixed-stage-right {

width: 50%;

height: 100%;

position: fixed;

overflow: hidden;

top: 150px;

right: 0;

background: #0cf;

color: #000;

}

任何想法将不胜感激.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值