#divAddress{
position: relative;
margin-top: 48px;//这就是刚才提的当使用margin的时候才能进行下面的相对
width: 370px;
height: 66px;
border-bottom: 1px #c1c1c1 solid;
}
#img1{
position: absolute;
float: left;margin-top:2px;
width: 24px; height: 24px;
}
.address{
position: absolute;
margin-left: 34px;
font-size: 20px;
color: #c1c1c1;
}
#peoplePost1{
position: relative;
margin-top: 12px;
width: 370px;
height: 40px;
border-bottom: 1px #c1c1c1 solid;
}
#people1{
position: absolute;
float: left;margin-top:2px;
width: 24px; height: 24px;
}
.people2{
position: absolute;
margin-left: 34px;
font-size: 20px;
color: #c1c1c1;
}
#post1{
position: absolute;
float: left;margin-top:2px;margin-left:192px;
width: 24px; height: 24px;
}
.post2{
position: absolute;
margin-left: 222px;
font-size: 20px;
color: #c1c1c1;
}
<
div
id
=
"divAddress"
>
<
img
id
=
"img1"
alt
=
"address"
src="<%=request.getContextPath()%>/images/address.png">
<
div
class
=
"address"
>地址 : <
span
style
=
"font-weight: 600;color: black;"
>输入上海市卢湾区卢湾榜路758弄10号1011室</
span
></
div
>
</
div
>
<
div
id
=
"peoplePost1"
>
<
img
id
=
"people1"
alt
=
"people"
src="<%=request.getContextPath()%>/images/people.png">
<
div
class
=
"people2"
>联系人 : <
span
style
=
"font-weight: 600;color: black;"
>张三</
span
></
div
>
<
img
id
=
"post1"
alt
=
"post"
src="<%=request.getContextPath()%>/images/post.png">
<
div
class
=
"post2"
>职位 : <
span
style
=
"font-weight: 600;color: black;"
>业务经理</
span
></
div
>
</
div
>