快捷导航
发新帖
返回列表
2 648
电梯直达  跳转到指定楼层

[作业] 5.2元素定位

zxrzxr|注册会员 |勤币 59 |学币 0
发表于 2016-7-30 12:32 | 复制链接 | 打印 | 上一主题 | 下一主题
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
#div1 {
        height: 156px;
        width: 950px;
        margin-top: 5px;
        margin-left: 24px;
        float: none;
}
#div2 {
        float: left;
        height: 380px;
        width: 404px;
        position: absolute;
        left: 61px;
       
        top: 170px;
}
#div3 {
        float: left;
        height: 380px;
        width: 430px;
        position: absolute;
        left: 475px;
        top: 170px;
}
#div4 {
        float: none;
        height: 125px;
        width: 950px;
        position: absolute;
        left: 24px;
        top: 558px;
}
div {
        border: 2px solid #CCC;
}
</style>


</head>

<body>
<div id="div1">1</div>
<div id="div2">2</div>
<div id="div3">3</div>
<div id="div4">4</div>

</body>
</html>


举报 使用道具
| 回复

共2个回复 最后回复于 2016-7-30 16:28

勤币 18146   学币 398  
沙发
发表于 2016-7-30 16:27:22 | 只看该作者
完成不错,注意每个数值设置的来由,实际操作中需要自己在效果图中测量数字。
举报 使用道具
勤币 18146   学币 398  
板凳
发表于 2016-7-30 16:28:11 | 只看该作者
完成不错,注意每个数值作用的地方哦。然后交作业贴代码和效果图。
举报 使用道具
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表