多張圖片自動換行後圖片居中顯示
❥奈我何❥
❥奈我何❥ 2019-03-07 11:37:05
0
5
1489
多张图片横向并排显示,自动换行后,可以上下两排图片都居中显示吗


#
❥奈我何❥
❥奈我何❥

全部回覆(3)
清
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
div{
text-align: center;
}
</style>
</head>
<body>
<div>
<img src="http://www.php.cn/static/images/footer.gif" alt="">
<img src="http://www.php.cn/static/images/footer.gif" alt="">
<img src="http://www.php.cn/static/images/footer.gif" alt=""><br>
<img src="http://www.php.cn/static/images/footer.gif" alt="">
<img src="http://www.php.cn/static/images/footer.gif" alt="">
</div>
</body>
</html>

DIV居中可以了

  • 回覆 第三張圖片那裡不強制換行呢?
    ❥奈我何❥ 作者 2019-03-11 10:44:12
❥奈我何❥

不行的,試過了。如果沒有自動換行可以居中顯示,有自動換行後就左對齊的

殘留の回憶

text-align:center,這個就可以解決你的問題

#
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!