如何让主内容 div 填充屏幕高度(CSS 和 HTML)
position 属性指定对元素使用的定位方法类型(static、relative、absolute、fixed 或 sticky)。
在下面给出的示例中,未以百分比指定高度,也不需要 jQuery
.mainbody{
position: absolute;//here we are setting the position of an element as absolute
top: 30px; /* here we are defining Header Height to 30 px */
bottom: 10px; /*here we are defining Footer Height to 10 px */
width: 100%;// here we are setting the width to 100%
}
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP