我有一个下拉菜单,由于上边距保持弹出窗口不显示,因此不会让您一直滚动到底部。我试过添加填充但它不起作用。这是代码。任何帮助表示赞赏。
.shifter-enabled .shifter-navigation {
width: 270px;
height: 100%;
position: fixed;
padding-bottom: 20px;
top: 30px;
left: 0;
z-index: 5;
background: #ffffff;
display: block;
overflow-y: scroll;
pointer-events: none;
-webkit-transition: opacity 0.001s linear 0.2s, -webkit-transform 0.2s ease;
transition: opacity 0.001s linear 0.2s, transform 0.2s ease;
}
答案 0 :(得分:1)
删除height:100%
并添加bottom:0px;
:
.shifter-enabled .shifter-navigation {
width: 270px;
position: fixed;
padding-bottom: 20px;
top: 30px;
bottom: 0px;
left: 0;
z-index: 5;
background: #ffffff;
display: block;
overflow-y: scroll;
pointer-events: none;
-webkit-transition: opacity 0.001s linear 0.2s, -webkit-transform 0.2s ease;
transition: opacity 0.001s linear 0.2s, transform 0.2s ease;
}
通过将高度设置为100% - 它将与视口一样高,但当您将其向下移动30px时,它将偏离屏幕底部30px。通过设置顶部和底部而没有高度,它将始终被拉伸以满足视口的大小
答案 1 :(得分:0)
快速修复是添加空白li元素以创建手动填充。