小皮鞋
2016-12-04 16:51
做成左右结构,俩个背景图片中间有空隙
div1{float:left;}
div2{float:right}
<style type="text/css">
div{height:200px;width:100%;}
.d1{
width:49%;
float:left;
background-image:url(xxxxxxx1)
}
.d2{
width:49%;
float:right;
background-image:url(xxxxx2)
}
</style>
<div>
<div class="d1"></div>
<div class="d2"></div>
</div>
<div>
<img src="1.jpg" class="test">
<img src="2.jpg" class="test">
</div>
然后在样式中插入
.test{
margin: 20px;
}
可以再说的详细点吗
使用margin元素属性
初识HTML(5)+CSS(3)
1230042 学习 · 19084 问题
相似问题