我有问题。如果我的鼠标位于此块上方,则页面上的固定块会阻止滚动。 我的例子:
body {
overflow: hidden;
padding: 0;
margin: 0;
}
.body_block {
display:block;
position: absolute;
width: 100%;
height: 100%;
background-color: #e0e0e0;
overflow: hidden;
}
.menu {
display: block;
width: 100px;
height: 200px;
background-color: #ffdd56;
position: fixed;
top: 0;
right: 0;
z-index: 3;
}
.content {
display: block;
position: relative;
top: 0;
left: 0;
background-color: #a9eceb;
width: 100%;
height: 100%;
z-index: 2;
overflow: scroll;
}
答案 0 :(得分:0)
这是工作小提琴:http://jsfiddle.net/u6b42vsq/4/ 这是最后的css:
body {
padding: 0;
margin: 0;
}
.body_block {
display:block;
position: absolute;
width: 100%;
background-color: #e0e0e0;
overflow: hidden;
}
.menu {
display: block;
width: 100px;
height: 200px;
background-color: #ffdd56;
position: fixed;
top: 0;
right: 0;
z-index: 3;
}
.content {
display: block;
position: relative;
top: 0;
left: 0;
background-color: #a9eceb;
width: 100%;
height: 100%;
z-index: 2;
}