html div高度100%无效 移动端相关: div高度继承自父元素——》body——》html 解决方案: html,body { height: 100%;margin: 0; padding: 0;}然后对应的div设置高度——height:100% 则可以生效