Beispiel:Overflow-2.html

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche

<!DOCTYPE html> <html> <head>

 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <title>Textumbruch</title>
 <style>
  1. eins { word-break: break-all; }
  2. zwei {
-webkit-hyphens: auto; 
hyphens: auto; 
}

.box { color: #c82f04; font-family: Arial, Helvetica, sans-serif;

 font-size: 3em;

font-weight: bold;

 border: medium solid black;
 padding: 3px;
 width: 150px;

}

body{

 display: grid;
 grid-template-columns: repeat(auto-fill, 16em);

}

h1 { grid-column: 1 / -1; }


 </style>	

</head>

<body>

Textumbruch

<figure>

CSS is awesome!

<figcaption>word-break: break-word;</figcaption> </figure>

<figure>

CSS is awesome!

<figcaption> hyphens: auto;</figcaption> </figure>

</body> </html>