用css怎么在一个框架中横排显示几张图片
展开全部
注意添加一个属性float:left;下面是参考事例:
<div style="width:765px;height:230px;margin-left:auto;margin-right:auto;">
<div style="width:255px;height:230px;float:left;background-image:url(images/zy.png);background-repeat:no-repeat;"></div>
<div style="width:255px;height:230px;float:left;background-image:url(images/zx.png);background-repeat:no-repeat;"></div>
<div style="width:255px;height:230px;float:left;background-image:url(images/zz.png);background-repeat:no-repeat;"></div>
</div>
<div style="width:765px;height:230px;margin-left:auto;margin-right:auto;">
<div style="width:255px;height:230px;float:left;background-image:url(images/zy.png);background-repeat:no-repeat;"></div>
<div style="width:255px;height:230px;float:left;background-image:url(images/zx.png);background-repeat:no-repeat;"></div>
<div style="width:255px;height:230px;float:left;background-image:url(images/zz.png);background-repeat:no-repeat;"></div>
</div>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |