overflow-wrap-anywhere-011-ref.html (745B)
1 <!DOCTYPE html> 2 <html> 3 <meta charset="utf-8"> 4 <title>CSS Text Reference: overflow-wrap: anywhere</title> 5 <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> 6 <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> 7 8 <style> 9 div { 10 /* Use sans-serif fonts to ensure the width of ` ` is larger than `i`. */ 11 font-family: Arial, Helvetica, sans-serif; 12 font-size: 100px; 13 width: min-content; 14 overflow-wrap: anywhere; 15 border: 5px solid blue; 16 margin-bottom: 5px; /* To separate <div>s visually. */ 17 } 18 </style> 19 20 <p>The first three div should have the same width, but the fourth one should be wider.</p> 21 <div>i</div> 22 <div>i</div> 23 <div>i</div> 24 <div>i </div> 25 </html>