0
我有这两个div:父div #filterSelect
,包含一组过滤器,它的子div #applyFilterIKnow
即“应用过滤器”按钮。 #applyFilterIKnow
应该始终可见并固定在#filterSelect
div的底部。问题是#applyFilterIKnow
与#filterSelect
一起滚动。这里的两个CSS:Sass/CSS:停止固定div随父母div一起滚动
#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与页面内容的其余部分重叠。我能做什么?在此先感谢任何人响应我的疑问:(
下面是相关问题的一些截图:
感谢您的回答!我会看看我能否做到这一点,因为这已经建立,也许我将不得不改变os js:s –