麻烦帮我看一下哪里不对
CTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
*{margin: 0;padding: 0;}
.a{
width:1600px;
top: 0;
left: 50%;
margin-left: -800px;
height: 100px;
background-color: black;
font-size: 26px;
font-weight: bold;
position: fixed;
}
.z{
background: url(http://img1.sycdn.imooc.com/climg//58c0d2d900016ce303000100.png) no-repeat left center;
width: 380px;
height: 100px;
float: left;
}
.y{
height: 100px;
padding: 0 40px;
line-height: 100px;
float: right;
color:white;
}
.b{
margin-top: 100px;
height: 480px;
background: url(http://img1.sycdn.imooc.com/climg//58c0eda50001e12416000480.jpg) no-repeat center;
}
.c{
height: 480px;
background: url(http://img1.sycdn.imooc.com/climg//58c0edb80001c9f216000480.jpg) no-repeat center;
}
.d{
margin-bottom: 100px;
height:480px;
background: url(http://img1.sycdn.imooc.com/climg//58c0edc9000100d516000480.jpg) no-repeat center;
}
.one{
width: 1600px;
height: 100px;
line-height: 100px;
background-color: black;
position: fixed;
text-align: center;
bottom: 0;
left:50%;
margin-left: -800px;
}
.x{
font-size: 16px;
color: white;
font-weight: bold;
padding: 0 60px;
display: inline;
}
</style>
</head>
<body>
<div class="a">
<div class="z"></div>
<div class="y">课程</div>
<div class="y">职业路径</div>
<div class="y">实战</div>
<div class="y">猿问</div>
<div class="y">手记</div>
</div>
<div>
<div class="b"></div>
<div class="c"></div>
<div class="d"></div>
</div>
<ul class="one">
<li class="x">网站首页</li>
<li class="x">企业合作</li>
<li class="x">人才招聘</li>
<li class="x">联系我们</li>
<li class="x">常见问题</li>
<li class="x">友情链接</li>
</ul>
</body>
</html>这是代码,搞了一个晚上,完全是一边做一遍去翻以前的资料的,困扰自己最久的就是页脚的内容,一开始想着用浮动,后来发现浮动不能实现居中效果,接着想着用定位,但是发现缺少了浮动的效果以后,不能实现内容在同一行了,最后才想起来display这个属性,之前学习的内容在脑子里都打结了
14
收起
正在回答 回答被采纳积分+1
3回答
前端小白入门系列课程
- 参与学习 人
- 提交作业 11218 份
- 解答问题 36712 个
从一个不会编程的小白到一个老司机是需要过程的,首先得入门,学习基础知识,然后才能进阶,最后再到精通,本专题是你走进前端世界的不二选择!
了解课程



恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星