如何使用 CSS 和 HTML 使主要内容 div 填满屏幕高度
position 属性指定用于元素的定位方法类型(静态、相对、绝对、固定或粘着)。
在下面给出的示例中,未指定高度百分比,也不需要 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