wbr标签在IE中不工作 [英] wbr tag doesn't work in IE
问题描述
软休息似乎无法在IE中工作。是否有任何替代方法或如何使其工作?
Soft break seems not to work in IE. Is there any alternative or how to make it work?
http:/ /fiddle.jshell.net/88q54/1/
body {
font-size: 272px;
}
<div>W<wbr/>o<wbr/>r<wbr/>d</div>
我希望word在不适合窗口宽度时是可破坏的。工作被包装在webkit和mozila,但不是在IE(10/11)。
I want the "word" to be breakable when it doesn't fit window width. The work is wrapped in webkit and mozila, but doesn't in IE (10/11).
我知道为了使字易碎我可以使用css word-break :break-all;
I know that for made words breakable I may use css word-break: break-all;
但我想能够将软断裂放在单词的某个位置,因此css word-break对我来说不能正常工作。 / p>
but I want to be able to put soft break in certain position of the word so css word-break doesn't work correctly for me.
推荐答案
将以下内容添加到样式表中:
Add the following into your style sheet:
wbr:after { content: "\00200B"; }
这将插入U + 200B ZERO WIDTH SPACE,这是好老的字符级别对应< wbr>
表示浏览器已大大损坏(a
This inserts U+200B ZERO WIDTH SPACE, which is the character-level counterpart of the good old <wbr>
that browsers have largely spoiled (a sad story).
或者,您也可以替换< wbr>
那个字符,你可以用HTML写成&#x200b;
。
Alternatively, you can replace <wbr>
tags by that character, which you can write in HTML as ​
.
这篇关于wbr标签在IE中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!