方法一:给当前div设置定位
.g-index { position: absolute; width: 100%; height: 100%; background-color: #f2f2f2; }
方法二:通过设置html,body的宽高,来实现
html,body{ width: 100%; height: 100%; } .g-index { width: 100%; height: 100%; background-color: #f2f2f2; }
方法一:给当前div设置定位
.g-index { position: absolute; width: 100%; height: 100%; background-color: #f2f2f2; }
方法二:通过设置html,body的宽高,来实现
html,body{ width: 100%; height: 100%; } .g-index { width: 100%; height: 100%; background-color: #f2f2f2; }