如何使用 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