1
我试图创建我的应用程序基本的管理界面,一切应显示所有的时间,除了一个格,块,溢出没有滚动条在Firefox
时,应滚动这里的HTML:
<div class="all">
<div class="header">
<div class="logo">a</div>
<div class="body">b</div>
</div>
<div class="content">
<div class="left">c</div>
<div class="right">
<div class="block">
<div class="one">A</div>
<div class="two">B</div>
<div class="three">C</div>
</div>
</div>
</div>
</div>
和css:
body
{
position:fixed;
top:0px;
left:0px;
bottom:0px;
right:0px;
margin:0px;
}
.all
{
position: relative;
display: table;
width: 100%;
height: 100%;
}
.header
{
display: table-row;
position: relative;
height: 50px;
}
.header .logo
{
position: relative;
display: table-cell;
background-color: red;
}
.header .body
{
position: relative;
display: table-cell;
background-color: yellow;
}
.content
{
position: relative;
display: table-row;
}
.content .left
{
position: relative;
display: table-cell;
height: 100%;
width: 150px;
background-color: green;
}
.content .right
{
position: relative;
display: table-cell;
height: 100%;
background-color: blue;
}
.block
{
display: block;
position: relative;
width: 100%;
height: 100%;
overflow-y: scroll;
}
.one, .two, .three
{
border: 1px solid black;
height: 500px;
}
.one
{
background-color: aliceblue;
}
.two
{
background-color: aqua;
}
.three
{
background-color: brown;
}
我encoutred一个问题,在IE浏览器,Chrome浏览器,我看到滚动条,但不是在Firefox浏览器。我创建了JS提琴,所以你可以看到:
有人能帮助我吗?
更改这个类:{。一背景 色:艾莉斯蓝; 溢出:auto; } – jeff
没有在我的Firefox上工作... –
问题是你有'高度:100%'''.block'。如果你可以给它一个固定的高度,它会解决它。 – EmileKumfa