为了账号安全,请及时绑定邮箱和手机立即绑定

如何用CSS进行网页布局

江老实 Web前端工程师
难度初级
时长22分
学习人数
综合评分9.60
1991人评价 查看评价
9.8 内容实用
9.6 简洁易懂
9.4 逻辑清晰
.main{width:auto; background:red; height:400px;position:relative;overflow:hidden;}
.left{ width:200px;background:blue;float:left;}
.right{clear:both; background:green;width:100%;position:absolute;margin-left:210px;}
.foot{background:orange;clear:both;}
昨天还是好好的,今天慕课就更新了,幸好变化不是特别大。
点赞!!!!!!!!!!!!
以前都是自己在瞎折腾,总算能系统学习了
Jep
我自己测试了一下~把左右两边的宽改了下就走样了~但就不了解他的原理...
老师讲课通俗易懂 赞!
body{ text-align:left;}
.top{background:grey;margin:0 auto;height:100px;}
.main{background:red;overflow:hidden;height:500px;}
.left{ background:blue;width:200px;float:left;height:500px;}
.right{background:green;float:right;height:500px;width:70%;}
.foot{background:yellow;margin:0 auto;clear:both;}
body{ margin:0; padding:0; font-size:30px; color:#fff}
.top{background:gray;height:100px;}
.main{}
.left{background:blue;float:left;width:380px;border-right:10px solid red;height:500px;}
.right{background:green;float:right;width:512px;height:500px;}
.foot{background:pink;clear:both;}
太小声了!
视频开始时和慕课LOGO一起出来的声音让人不舒服 只有我一个人这么觉得么
clear:both 清除两边浮动元素
.top{background-color:gray;margin:0 auto;width:100%;height:60px;}
.main{height:300px;}
.left{width:200px;background-color:blue;height:300px;position:absolute;top:60px;}
.right{background-color:green;margin-left:200px;height:300px}
.foot{background-color:orange;margin:0 auto;width:100%;}
很喜欢老师的“啊”!亲切死啦~~~
老师好棒!
老师讲的很清楚 赞
课程须知
1.你需要掌握html+css样式基础知识 2.有一定的前端实际开发经验
老师告诉你能学到什么?
1.掌握网页布局的相关知识 2.能对不同的网页进行布局结构划分 3.掌握固定宽度和自适应宽度的实现方法

微信扫码,参与3人拼团

微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

友情提示:

您好,此课程属于迁移课程,您已购买该课程,无需重复购买,感谢您对慕课网的支持!

本次提问将花费2个积分

你的积分不足,无法发表

为什么扣积分?

本次提问将花费2个积分

继续发表请点击 "确定"

为什么扣积分?

举报

0/150
提交
取消