.top{width:auto;height:100px;background:#00DF00;}
.main{width:auto;height:600px;background:red;}
.left{ width:36%;height:600px;float:left;background:blue;}
.right{width:60%;height:600px;float:right;background:green;}
.foot{width:auto;height:50px;background:#7FFF55;}
</style>
</head>
.main{width:auto;height:600px;background:red;}
.left{ width:36%;height:600px;float:left;background:blue;}
.right{width:60%;height:600px;float:right;background:green;}
.foot{width:auto;height:50px;background:#7FFF55;}
</style>
</head>
最赞回答 / 小呀嘛小白菜
首先你要分清楚这也网页究竟有几个功能模块,划分清楚后再设计每个大模块中的子模块,确定好平面设计之后,再如课程开头所说,利用css的浮动、定位等方式进行模块的布局划分
2016-10-31
最新回答 / Blizzard_lihe
最普遍常用:<link href="文件路径" rel="stylesheet" type="test/css" />有时会有兼容问题:@import url("public.css");
2016-10-27
.top{ width:100%; height:50px; background:grey; }
.main{width:100%;background:red;position:relative;}
.left{width:200px;height:300px;background:blue; position:absolute; top:0; left:0;}
.right{width:auto;height:300px;background:green;margin-left:210px;}
.foot{width:100%;height:30px;background:#f90;}
.main{width:100%;background:red;position:relative;}
.left{width:200px;height:300px;background:blue; position:absolute; top:0; left:0;}
.right{width:auto;height:300px;background:green;margin-left:210px;}
.foot{width:100%;height:30px;background:#f90;}
.top{ width:100%; height:50px; background:grey; }
.main{width:100%;background:red;position:relative;overflow:hidden;}
.left{width:200px;height:300px;background:blue;}
.right{width:100%;height:300px;background:green;margin-left:210px;position:absolute;}
.foot{width:100%;height:30px;background:#f90;}
.main{width:100%;background:red;position:relative;overflow:hidden;}
.left{width:200px;height:300px;background:blue;}
.right{width:100%;height:300px;background:green;margin-left:210px;position:absolute;}
.foot{width:100%;height:30px;background:#f90;}