【发布时间】:2017-07-29 03:21:02
【问题描述】:
我有这两个 div:父 div #filterSelect 包含一组过滤器,其子 div #applyFilterIKnow 是“应用过滤器”按钮。 #applyFilterIKnow 应该始终可见并固定在 #filterSelectdiv 的底部。问题是#applyFilterIKnow 与#filterSelect 一起滚动。这是两者的 CSS:
#filterSelect {
transform: translateX(100%);
transition: transform 0.3s;
overflow-x: auto;
overflow-y: auto;
width: 15%;
position: absolute;
z-index: 1000;
right: 0;
height: 100%;
}
#applyFilterIKnow {
position: fixed;
width: 100%;
height: 50px;
bottom: 0;
right: 0;
background-color: #4370d9;
transition: all 0.5s ease;
font-size: 2rem;
padding-top: 10px;
text-align: center;
color: white;
cursor: pointer;
}
我省略了一些与背景颜色相关的 css。据说其中一种解决方案是将#filterSelect 的位置设置为相对,但这会使整个div 与页面内容的其余部分重叠。我能做些什么?提前感谢任何回答我的疑问的人:(
这里是一些与问题相关的截图:
【问题讨论】: