recherche

Maison  >  Questions et réponses  >  le corps du texte

Comment rendre cela automatiquement multiligne

<p>Comment rendre cela automatiquement multiligne</p> <p>J'utilise HTML et CSS</p> <p>Voici mon code (je l'ai légèrement modifié car une partie du code provient de PHP) : </p> <pre class="brush:php;toolbar:false;"><div style='border: 1px solid; padding: 10px;margin-top: 5px;'> <h2 style='margin: 0'>Nom&nbsp-&nbsp#id</h2> <hr> <span>ContentContentContentContentContentContentContentContentContentContent</span> </div><br></pre> <p>Comment les utiliser :</p> <p>https://i.stack.imgur.com/tUPpO.png</p> <p>https://i.stack.imgur.com/oCwuA.png</p> <p>Convertir vers ceci (sauter automatiquement une ligne) : </p> <p>https://i.stack.imgur.com/PQxJS.png</p>
P粉471207302P粉471207302576 Il y a quelques jours754

répondre à tous(1)je répondrai

  • P粉087951442

    P粉0879514422023-08-18 18:15:46

    Vous pouvez y parvenir en ajoutant word-wrap 和/或 overflow-wrap

    <div style='border: 1px solid; padding: 10px;margin-top: 5px; max-width:200px'>
        <h2 style='margin: 0'>Name&nbsp-&nbsp#id</h2>
        <hr>
        <span style='word-wrap: break-word; overflow-wrap: break-word;'>
            ContentContentContentContentContentContentContentContentContentContent</span>
    </div><br>

    répondre
    0
  • Annulerrépondre