css 解决fixed 布局下不能滚动的问题时间:2023-03-09 19:55:37 如果我们布局的是后是fixed并且想要高度为100%的时候,我们一般会这样设置: div { display:fixed; height:%; overflow:scroll; } 但是这样并不会出现滚动条,正确的做法应该设置top和bottom为0: .fixed-content { top: 0; bottom:0; position:fixed; overflow-y:scroll; overflow-x:hidden; }