基本上,我有一个#left-bar
div元素,它用作导航栏和一个主题窗口,其中包含一个iFrame。如果您运行该代码段,页面将如下所示:
/* main styling page, empty because there are no pages generated manually so we don't have to deal with this for now */
body{
max-width: 1780px;
font-family:Arial, Helvetica, sans-serif;
}
#top-bar{
background-color:cadetblue;
width: 1830px;
height: 100px;
}
#logo-container{
width: 125px;
height: 100px;
margin-left:15px;
float: left;
}
#logo{
width: 100%;
height: 100%;
}
#logo-container:hover{
cursor: pointer;
}
#search-bar-container{
position: relative;
top: 60px;
left: 220px;
width: 366px;
height: 30px;
}
#search-bar-container > input{
position: absolute;
left: 0px;
width: 100%;
height: 100%;
font-family: 'Times New Roman', Times, serif;
font-size: large;
}
#center-main{
background-color: red;
width: 1830px;
height: 805px;
margin-top: 5px;
position:relative;
outline: thin solid black;
}
.document{
overflow: auto;
}
#left-bar{
background-color: yellow;
width: 220px;
height: 775px;
position: relative;
float: left;
resize: horizontal;
}
#left-bar-icons{
background-color:#b3b4b5;
width: 100%;
height: 30px;
position: relative;
outline: thin solid black;
}
#reset-container{
background-color: #b3b4b5;
width: 20px;
height: 20px;
position: relative;
top: 5px;
left: 195px;
}
#nav-bar-reset-icon{
width: 100%;
height: 100%;
}
#reset-container:hover{
cursor:pointer;
}
#toc{
background-color: lightgray;
border-right: thin solid black;
width:99.5%;
height:770px;
overflow: auto;
padding-top: 5px;
}
.content{
padding: 3px;
margin-left: 5px;
}
.content-drop{
float:left;
}
.content-drop:hover{
cursor: pointer;
}
.content-link{
color: black;
text-decoration: none;
}
.l1-drop-container{
margin-left: 20px;
margin-top: 4px;
width: 100%;;
display: none;
}
.l1-content-link{
display: inline-block;
text-decoration: none;
color: black;
}
.l2-drop-container{
margin-left: 30px;
margin-top: 4px;
width: 100%;
display:none;
}
.l2-content-link{
text-decoration: none;
color: black;
margin-bottom: 5px;
}
.l1-content-drop:hover{
cursor:pointer;
}
#topic-window{
background-color:#e9e9ed;
width: 1610px;
height: 100%;
position:relative;
float:right;
outline: thin solid black;
}
#docWindow{
width: 100%;
height: 100%;
position:relative;
float: right;
}
.show-l2-content{
display: block;
}
.show-left-bar{
display: block;
}
个字符
我尝试在CSS文件中将resize: horizontal;
添加到#left-bar
中,但是当添加resize
时,我无法真正看到弹出在其中一个角落的调整大小按钮。
我在想问题可能是一些元素相互重叠或什么的,但即使如此,我不知道为什么和什么会重叠。
希望你能帮忙。
2条答案
按热度按时间xvw2m8pv1#
问题是,当你调整大小时,你还必须做一个溢出:auto在同一元素上。
所以只要加上一个overflow:自动到#左栏就可以了。
个字符
但正如你所看到的,这不是你想要的行为。
试试这个codepen
(Note:为了简单起见,我减少了HTML和CSS,但实现方式保持不变。)
nfg76nw02#
我发现问题了。和我想的一样简单。
我只是不得不让
overflow: visible;
字面上任何,但overflow: visible;
。将其更改为overflow: auto;
工作,我没有测试其他人,但我打赌他们也工作。