我想在html中對齊圖片網格旁邊的視頻文件。我似乎無法找到正確的代碼組合,使其正確適合並仍然有用。如何使視頻與圖像網格對齊?
這裏是電網正常工作,如果我用的圖像作爲視頻的佔位符:
<div style="float: left; margin-right: 5px;">
<p class="mod-reset"><img class="middle-img" src="http://studio2d3d.com/wp-content/uploads/2017/06/ShampooAd_Timeline.gif" width="336" height="460"></p>
<p style="text-align: center;">This is video 1</p>
</div>
<div style="float: left; margin-right: 5px;">
<p class="mod-reset"><img class="middle-img" src="http://studio2d3d.com/wp-content/uploads/2017/06/ShampooAd_Timeline.gif" width="158" height="216"></p>
<p style="text-align: center;">This is image 1</p>
</div>
<div style="float: left; margin-right: 5px;">
<p class="mod-reset"><img class="middle-img" src="http://studio2d3d.com/wp-content/uploads/2017/06/ShampooAd_Timeline.gif" width="158" height="216"></p>
<p style="text-align: center;">This is image 2</p>
</div>
<div style="float: left; margin-right: 5px;">
<p class="mod-reset"><img class="middle-img" src="http://studio2d3d.com/wp-content/uploads/2017/06/ShampooAd_Timeline.gif" width="158" height="216"></p>
<p style="text-align: center;">This is image 3</p>
</div>
<div style="float: left; margin-right: 5px;">
<p class="mod-reset"><img class="middle-img" src="http://studio2d3d.com/wp-content/uploads/2017/06/ShampooAd_Timeline.gif" width="158" height="216"></p>
<p style="text-align: center;">This is image 4</p>
這裏是我在添加視頻的嘗試,但它只能顯示圖像或視頻圖標:
<div style="float: left; margin-right: 5px;">
<p class="mod-reset"><video src="http://studio2d3d.com/wp-content/uploads/2017/06/ShampooAd_Timeline_compress2.mp4" width="271" height="600">
</video></p>
</div>
<div style="float: left; margin-right: 5px;">
<p class="mod-reset"><img class="middle-img" src="http://studio2d3d.com/wp-content/uploads/2017/06/ShampooAd_Timeline.gif" width="158" height="216"></p>
<p style="text-align: center;">This is image 1</p>
</div>
<div style="float: left; margin-right: 5px;">
<p class="mod-reset"><img class="middle-img" src="http://studio2d3d.com/wp-content/uploads/2017/06/ShampooAd_Timeline.gif" width="158" height="216"></p>
<p style="text-align: center;">This is image 2</p>
</div>
<div style="float: left; margin-right: 5px;">
<p class="mod-reset"><img class="middle-img" src="http://studio2d3d.com/wp-content/uploads/2017/06/ShampooAd_Timeline.gif" width="158" height="216"></p>
<p style="text-align: center;">This is image 3</p>
</div>
<div style="float: left; margin-right: 5px;">
<p class="mod-reset"><img class="middle-img" src="http://studio2d3d.com/wp-content/uploads/2017/06/ShampooAd_Timeline.gif" width="158" height="216"></p>
<p style="text-align: center;">This is image 4</p>
</div>
我已經試過:
<div><video src="blah.mp4" width="271" height="600"></video></div>
<div>[video width="271" height="600" src="blah.mp4"[/video]</div>
既不似乎做到這一點,我想我忘記一些標籤。
笏你意味着什麼? [測試](https://jsfiddle.net/3w1cp9fn/)你能指出有什麼問題嗎? – Razorphyn