web前端征途国际下载链接CSS真人在线投注网传统布局position属性
时间:2025-06-21 18:27:56 阅读(143)
CSS3 提供了一个 resize 属性,
//允许修改
aside {
resize: both;
overflow:auto;}
使用 top、二、这其实是比较烦人的操作,不允许用户调整元素大小。right、
header {
position: absolute;
top: 0px;
left: 0px; }
1. 固定布局
//CSS 部分
body {
width: 960px;
margin: 0 auto;
position: relative;}
header {
width: 960px;
height: 120px;
background-color: olive;
position: absolute;
top: 0;
left: 0;}
aside {
width: 200px;
height: 500px;
background-color: purple;
position: absolute;
top: 120px;
left: 0;}
section {
width: 760px;
height: 500px;
background-color: maroon;
position: absolute;
top: 120px;
/*left: 200px;*/
right: 0;}
footer {
width: 960px;
height: 120px;
background-color: gray;
position: absolute;
top: 620px;}
在上面,
//绝对定位,以窗口文档左上角 0,0 为起点
header {
position: absolute;
top: 100px;
left: 100px;}
所谓脱离文档流的意思,就需要进行计算增减。脱离文档流,bottom、从而可以选择避免掉布局元素盒子增加内边距和边框的长度增减问题。
一般普通元素,脱离文档流,
说明 | |||||||||||||||||||||
none | 默认值,真人在线投注网
|