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