按钮文本不会换行 IE11(Chrome,IE9 正常)



我试图在两个单词之间强制换行。它适用于最新版本的Chrome和IE9。然而,它在IE11中不起作用。我希望按钮在一行上显示一个单词,在另一行上显示另一个单词。例如,

TestTestTest/
FooFooFooFoo

我不想让文本换行,我想强制第二个单词到另一行。下面是示例代码:

http://jsfiddle.net/VM723/

    .BtnSize {
        width: 125px;
    }
    <input type="button" value="TestTestTest/&#10;FooFooFooFoo" class="BtnSize" />

try

   .BtnSize {
        width: 125px;
        white-space:normal;
        word-break: break-all; 
    }
http://www.w3schools.com/cssref/css3_pr_word-break.asp

试试这个:

<button type="button">TestTestTest/&#10;FooFooFooFoo</button>

最新更新