可以用视图 1.设置视图 #detail { height: 100vh; } 2.设置顶部及底部的宽度 .content { height: calc(100% - 44px - 58px); overflow: hidden; top: 44px; bottom: 60px; } 注意:很多人使用得不太明白,要设置距离底部的距离,也就是bottom: 60px;还有就是顶部的距离top: 44px;不然是没有效果的。