content元素为什么加了padding-bottom还是会被foot元素覆盖
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | <!DOCTYPE html> < html > < head > < meta charset = "UTF-8" > < title ></ title > < style type = "text/css" > *{margin: 0;padding: 0;} html,body { width: 100%; height: 100%; margin: 0; padding: 0; font-size: 25px; font-weight: 700px; } .log { width: 100%; height: 100px; background: black; margin: 0 auto; /*水平居中*/ overflow: hidden; position: fixed;top:0px; } img{float: left;} .nav{float:right;text-align: center;line-height: 100px;} .nav a{padding: 50px;text-decoration: none;color: #fff;} .content{width: 100%;height: 100%;padding-top: 100px;padding-bottom:100px;} .content img{width:100%;} .foot{width: 100%;height: 100px;background: black;margin: 0 auto;position: fixed;bottom:0px;line-height: 100px;text-align: center;} .foot a{padding: 50px;text-decoration: none;color: #fff;} /*此处写代码*/ </ style > </ head > < body > <!-- 此处写代码 --> < div class = "log" > < a href = "#" >< img src = "http://img1.sycdn.imooc.com/climg//58c0d2d900016ce303000100.png" ></ a > < div class = "nav" > < a href = "#" >课程</ a > < a href = "#" >职业路径</ a > < a href = "#" >实战</ a > < a href = "#" >猿问</ a > < a href = "#" >手记</ a > </ div > </ div > < div class = "content" > < img src = "http://img1.sycdn.imooc.com/climg//58c0eda50001e12416000480.jpg" > < img src = "http://img1.sycdn.imooc.com/climg//58c0edb80001c9f216000480.jpg" > < img src = "http://img1.sycdn.imooc.com/climg//58c0edc9000100d516000480.jpg" > </ div > < div class = "foot" > < a href = "#" >教育中心</ a > < a href = "#" >合作中心</ a > < a href = "#" >人才招聘</ a > < a href = "#" >常见问题</ a > < a href = "#" >联系我们</ a > </ div > </ body > </ html > |
4
收起
正在回答 回答被采纳积分+1
3回答
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧