After multiple pictures are automatically wrapped, the pictures are displayed in the center.
❥奈我何❥
❥奈我何❥ 2019-03-07 11:37:05
0
5
1533
多张图片横向并排显示,自动换行后,可以上下两排图片都居中显示吗


❥奈我何❥
❥奈我何❥

reply all(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>

The DIV can be centered

  • reply Why is there no forced line break in the third picture?
    ❥奈我何❥ author 2019-03-11 10:44:12
❥奈我何❥

No, I tried it. If there is no automatic word wrapping, it can be displayed in the center. If there is automatic word wrapping, it can be left aligned.

殘留の回憶

text-align:center, this can solve your problem

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!