DW中同一个div中有多张图片,如何实现图片横向排列?

DW中同一个div中有多张图片,如何实现图片横向排列?,第1张

代码中同一个DIV中多张图片怎么浮动 可以用nth-child(n)试下<div class= img > <img src= alt= /> <img src= alt= /> <img src= alt= /> <img src= alt= /> <img src= alt= /> <img src= alt= /></div><style> .img{position: relative z-index: 0 width: 800px height: 600px } .img{position: absolute } .img img:nth-child(1){top: 0 left: 0 } .img img:nth-child(2){top: 0 left: 50px } .img img:nth-child(3){top: 0 left: 100px }</style>

<div style="width:960pxoverflow-x:scroll">

  <div style="width:2280px">

  <img src="1.jpg" width="760" height="100"/>

  <img src="2.jpg" width="760" height="100" />

  <img src="3.jpg" width="760" height="100"/>

  </div>

</div>


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/11900808.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-19
下一篇2023-05-19

发表评论

登录后才能评论

评论列表(0条)

    保存