word-break-keep-all-010.html (1434B)
1 <!DOCTYPE html> 2 <html lang="en" > 3 <head> 4 <meta charset="utf-8"> 5 <title>word-break: keep-all, korean (Hangul Jamos)</title> 6 <meta name="assert" content="word-break: keep-all means breaking is forbidden within 'words'. In this style, sequences of CJK characters do not break."> 7 <link rel='help' href='https://drafts.csswg.org/css-text-3/#word-break-property'> 8 <link rel='match' href='reference/word-break-keep-all-ref-010.html'> 9 <link rel='author' title='Makoto Kato' href='mailto:m_kato@ga2.so-net.ne.jp'> 10 <style type='text/css'> 11 .test { word-break: keep-all; } 12 /* the CSS below is not part of the test */ 13 .test, .ref { border: 1px solid orange; margin: 20px; padding: 10px; width: 390px; font: 36px/1 sans-serif; } 14 </style> 15 </head> 16 <body> 17 <div id='instructions'>Test passes if the two orange boxes are the same.</div> 18 <div class="test" lang="ko"><div id="testdiv"><span id="testspan">애기판다 애기판다</span></div></div> 19 <div class="ref" lang="ko"><span>애기판다<br/>애기판다</span></div> 20 <script> 21 var sentenceWidth = document.getElementById('testspan').offsetWidth; 22 document.getElementById('testdiv').style.width = String(sentenceWidth - 5)+'px'; 23 </script> 24 </body> 25 </html>