请老师帮忙检查一下,感谢
来源:2-12 编程练习
qq_初晴moment_5
2019-08-01 21:45:08
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
body{padding: 0;margin: 0;}
.header{
width: 100%;
height: 100px;
background: black;
position: fixed;
}
.con1{
width:300px;
height: 100px;
background: url(http://climg.mukewang.com/58c0d2d900016ce303000100.png);
float: left;
}
.con2{
width: auto;
height: 100px;
float: right;
}
.con2-1{
width: auto;
height: 100px;
text-align: center;
line-height: 100px;
color: white;
float: left;
margin: auto 40px;
}
.bodyer{
width: 100%;
height: 2000px;
background: #00ffff;
padding-top: 100px;
}
.bod{
width: 80%;
height: 2000px;
/* border: 1px solid black;
*/ margin: 0 auto;
}
.left{
width: 32%;
height: 2000px;
float: left;
}
span{
background-color: #ffa07a;
}
.h1{
font-size: 24px;
}
.right{
width: 32%;
height: 2000px;
float: left;
}
.middle{
width: 30%;
height: 2000px;
float: right;
border-left: 4px solid #ff8c00;
margin: 0 auto;
}
form{
width: 30%;
height: 100%;
margin: 0 auto;
}
.footer{
width: 100%;
height: 40px;
background: black;
margin: 0 auto;
line-height: 40px;
color: white;
text-align: center;
position: fixed;
bottom: 0;
}
.footer ul{
margin: 0 auto;
line-height: 40px;
}
li{
display: inline-block;
line-height: 40px;
margin: 0 40px;
}
</style>
</head>
<body>
<div class="header">
<div class="con1"></div>
<div class="con2">
<div class="con2-1">课程</div>
<div class="con2-1">职业路径</div>
<div class="con2-1">实战</div>
<div class="con2-1">猿问</div>
<div class="con2-1">手记</div>
</div>
</div>
<div class="bodyer">
<div class="bod">
<div class="left">
<p class="h1">课程推荐</p>
<p><span>职业路径</span> HTML5与CSS3实现动态网页</p>
<p><span>职业路径</span> 零基础入门Android语法与界面</p>
<p><span>职业路径</span> iOS基础语法与常用控件</p>
<p><span>职业路径</span> PHP入门开发</p>
<p><span>职业路径</span> JAVA入门开发</p>
</div>
<div class="right">
<p class="h1">相关课程</p>
<p>HTML CSS JavaScript</p>
<p>HTML5 CSS3 Jquery</p>
<p>移动端基础 移动端APP开发</p>
</div>
<div class="middle">
<form>
<p class="h1">登录</p>
<input type="text" name="username" size="30" placeholder="请输入登录邮箱/手机号" style="width: 250px;height: 25px;"><br/><br/>
<input type="pasword" name="pas" size="30" placeholder="6-16位密码,区分大小写,不能用空格" style="width: 250px;height: 25px;"><br/><br/>
<input type="submit" name="sub" value="登录" style="background: red;color:white;height: 28px;width: 250px;">
</form>
</div>
</div>
</div>
<div class="footer">
<ul>
<li>网站首页</li>
<li>企业合作</li>
<li>人才招聘</li>
<li>联系我们</li>
<li>常见问题</li>
<li>友情链接</li>
</ul>
</div>
</body>
</html>1回答
同学你好!
一般来说底部和顶部的高度会设置为一样的,而且底部实现水平居中可以优化:
如果帮助到了你 欢迎采纳 祝学习愉快~
相似问题