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

在 如何用css进行布局 的课程的5.2中,footer没有背景颜色是什么原因

在 如何用css进行布局 的课程的5.2中,footer没有背景颜色是什么原因

断桥丶晓风残月 2016-08-25 14:07:30
footer没有背景颜色显示是什么原因呢? <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>混合布局</title> <style> body{ margin:0; padding:0; font-size:30px; font-weight:bold} div{ text-align:center; line-height:50px} .top{ height:100px;background:#9cf} .head,.main{ width:960px;margin:0 auto; 【任务1】} .head{ height:100px; background:#f90} .footer{height:50px;background#fcc;margin:0 auto} .left{ width:220px; height:600px; background:#ccc;float:left; 【任务2】} .right{ width:740px; height:600px;background:#fcc; float:right} .r_sub_left{ width:540px; height:600px; background:#9c3; float:left} .r_sub_right{ width:200px; height:600px; background:#9fc; float:right;【任务3】} /*.footer{height:50px;margin:0 auto;background:#fcc}*/ </style> </head> <body> <div class="top">     <div class="head">head</div> </div> <div class="main">     <div class="left">left</div>     <div class="right">     <div class="r_sub_left">sub_left         </div>         <div class=" r_sub_right">sub_right         </div>     </div> </div> <div class="footer">footer</div> </body> </html>
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 1287 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信