本文主要介绍底部栏的兼容问题 1.html结构如下:
<div class="page"> <div class="container"> <div class="container"> 页面内容页面内容 </div> <div class="footer">提交按钮</div> </div> </div>2.css部分样式如下:
/* 页面整体 */ .page{ position: relative; height: 100%; } /* 页面内容区域 */ .container{ position: absolute; top: 0rpx;/* 此部分视情况而定,如果页面内容显示不完整时,需要添加*/ bottom:20px;/* 距离页面底部的距离,自定义*/ overflow-y: scroll;/* 超出部分以滚动条显示*/ -webkit-over-scroll:touch; height: auto;/* 页面高度自适应*/ width: 100%; } /* 部分浏览器中设置 `overflow-y: scroll`会出现滚动条,这时Wimbledon需要定义滚动条的样式,具体如下:*/ ::-webkit-scrollbar{ /*scroll滚动条设置*/ width:0px; height:0px; background-color:#fff;/*滚动条的颜色*/ } /* 底部栏 */ .footer{ position:absolute; bottom:0px;;/* 距离页面底部的距离,自定义*/ }