position 属性指定用于元素的定位方法的类型(静态、相对、绝对、固定或粘性)。
.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% }
以上就是如何使用CSS和HTML使主要内容div填充屏幕高度的详细内容,更多请关注php中文网其它相关文章!
已抢65164个
抢已抢28724个
抢已抢15650个
抢已抢7892个
抢已抢9873个
抢已抢20023个
抢