多個div一行顯示,超出的自動排列到下一行

<div style="width: 600px;">
 	<div style="display: inline-block;width: 100px;margin-left: 17px;margin-top: 10px"">
        <img style="width: 100%;height: 100%; :src="billImg.orderImg">
        <p style="margin-left: 50%">1</p>
    </div>
    <div style="display: inline-block;width: 100px;margin-left: 17px;margin-top: 10px"">
        <img style="width: 100%;height: 100%; :src="billImg.orderImg">
        <p style="margin-left: 50%">2</p>
    </div>
    <div style="display: inline-block;width: 100px;margin-left: 17px;margin-top: 10px"">
        <img style="width: 100%;height: 100%; :src="billImg.orderImg">
        <p style="margin-left: 50%">3</p>
    </div>
    <div style="display: inline-block;width: 100px;margin-left: 17px;margin-top: 10px"">
        <img style="width: 100%;height: 100%; :src="billImg.orderImg">
        <p style="margin-left: 50%">4</p>
    </div>
<div>

效果:

 

說明: 如果不加下面的圖片排序 樣式寫成 display:  inline;就可以了;

            但是要加<p>標籤用於圖片排序的話就要改成   display: inline-block;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章