论坛
标题:
5.2元素定位
[打印本页]
作者:
zxrzxr
时间:
2016-7-30 12:32
标题:
5.2元素定位
<!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>
作者:
潜意式
时间:
2016-7-30 16:27
完成不错,注意每个数值设置的来由,实际操作中需要自己在效果图中测量数字。
作者:
潜意式
时间:
2016-7-30 16:28
完成不错,注意每个数值作用的地方哦。然后交作业贴代码和效果图。
欢迎光临 论坛 (http://bbs.qinxue.com/)
Powered by Discuz! X3.1