search

Home  >  Q&A  >  body text

After multiple pictures are automatically wrapped, the pictures are displayed in the center.

多张图片横向并排显示,自动换行后,可以上下两排图片都居中显示吗


❥奈我何❥❥奈我何❥2093 days ago1557

reply all(5)I'll reply

  • 清

    2019-03-09 22:48:00

    <!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
    0
  • ❥奈我何❥

    Why is there no forced line break in the third picture?

    ❥奈我何❥ · 2019-03-11 10:44:12
  • ❥奈我何❥

    ❥奈我何❥2019-03-08 20:08:54

    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.

    reply
    0
  • 殘留の回憶

    殘留の回憶2019-03-08 18:48:09

    text-align:center, this can solve your problem

    reply
    0
  • Cancelreply