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

为什么fixed后,DIV7消失了,怎么显示出来?

为什么fixed后,DIV7消失了,怎么显示出来?

慕粉15181338995 2016-06-24 10:51:09
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"         "http://www.w3.org/TR/html4/loose.dtd"> <html> <head>     <title></title>     <style type="text/css">         #div1{             width: 200px;             height: 200px;             background-color: #4061f5;         }         #div2{             width: 300px;             height: 300px;             background-color: #eff57b;         }         #div3{             width: 200px;             height:300px;             background-color: #f52e16;         }         #div4{             width: 100px;             height: 100px;             background-color: #70f5b1;         }         #div5{             width: 100px;             height: 100px;             background-color: #f595a6;         }         #div6{             width: 100px;             height: 100px;             background-color: #c500f5;         }         #div7{             border: 1px solid saddlebrown;             width: 50px;             height: 50px;             background-color: #f5783a;             position: fixed;         }         div{             margin:0;             padding: 0;         }     </style> </head> <body> <div id="div1">1</div> <div id="div2">2     <div id="div4">4</div>     <div id="div5">5</div>     <div id="div6">6</div> </div> <div id="div3">3</div> <div id="div7"></div> </body> </html>
查看完整描述

3 回答

已采纳
?
竹马君

TA贡献64条经验 获得超115个赞

//img1.sycdn.imooc.com//576cacd80001366704370119.jpg

少了7了

查看完整回答
1 反对 回复 2016-06-24
?
echo_kinchao

TA贡献600条经验 获得超86个赞

fixed是相对于浏览器来说的  如果没有就是你的内容没有撑开元素

查看完整回答
1 反对 回复 2016-06-24
  • 3 回答
  • 0 关注
  • 3035 浏览
慕课专栏
更多

添加回答

举报

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