网上有很多“CSS控制连续英文字母强制换行/用css让英文文本自动换行”之类的文章,但是没有一个可以解决我碰到的问题。
英文文字如下:
Shanghai Golden Ferry International Trade Co., Ltd. is located
in Pudong New District of Shanghai, China. What we do now are
concerning about living and life. Our Philosophy is to create
better living conditions and enhance life qualities for our
。。。
Shanghai & welcome to our company and
factories!
用网上的方法出现:
Shanghai Golden Ferry International Trade Co., Ltd. is located
in Pudon
g New District of Shanghai, China. What we do now are concerning
abou
t living and life. Our Philosophy is to create better living
conditions and e
nhance life qualities for our
。。。
Shanghai & welcome to our company and
factories!
英文单词被无情的劈开,那然后解决呢?
下面我提供我的解决方法:
首先写在该页面的顶部加入下面的代码:
function HTMLDecode(fString)
fString = Replace(fString," ",chr(32))
HTMLDecode = fString
end function
%>
然后在英文输出的地方加上:
这样就可以解决英文换行不分裂单词了
这是用后的效果:
Shanghai Golden Ferry International Trade Co., Ltd. is located
in Pudong
New District of Shanghai, China. What we do now are concerning
about
living and life. Our Philosophy is to create better living
conditions and
enhance life qualities for our 。。。
Shanghai & welcome to our company
and factories!
为什么这样就可以解决?
后来看代码才发现Shanghai Golden Ferry International Trade Co
在数据库里是这样的Shanghai Golden Ferry International Trade
Co
空格全是 所以系统把文章看一个很长的单词了,于是就割断单词了,我吧 这个换成空格后问题解决
那为什么会出现这样的情况呢?
我出现的情况,从网上复制的文章,然后点了文本,后在提交就出这问题了。