处理韩文断字 [英] Dealing with Korean text breaking words
问题描述
我正在建立一个显示朝鲜文字的网站。客户(美国本地人)非常不高兴,因为文本在单词中间被打断了。例如,这是一个图像:红色背景文本是一个单词。
I am building a website where I am displaying korean text. The client (US local) is being very unhappy because the text is breaking in the middle of words. As example of this, here is an image: Red background text being one word.
我尝试使用
word-break: keep-all;
,但Chrome / Safari不支持。
but it isn't supported in Chrome/Safari.
我能做什么?我在网上搜索了几个小时,却一无所获。这是cjk网站中所期望的东西,还是我找不到的解决方案?
What am I able to do? I have searched the web for hours and got nothing. Is this something that is expected in cjk sites or is there a solution that I haven't found.
这是一个响应网站,所以我不能费劲
It is a responsive site, so I can't put in hard breaks, or fake it.
演示: http: //codepen.io/cibgraphics/pen/tqzfG
推荐答案
为什么不使用jquery插件-https://github.com/mytory/jquery-word-break-keep-all
Why not use jquery plugin - https://github.com/mytory/jquery-word-break-keep-all
此插件适用于此。 IE具有CSS属性断字:keep-all;但其他浏览器则没有。
This plugin is for it. IE has CSS property word-break: keep-all; but other browser has not.
这篇关于处理韩文断字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!