[英]Button text won't line break IE11 (Chrome, IE9 fine)
I am trying to force a line break between two words. 我试图在两个单词之间强制换行。 It works in the latest version of Chrome and IE9. 它可以在最新版本的Chrome和IE9中使用。 However, it doesn't work in IE11. 但是,它在IE11中不起作用。 I want the button to show one word on one line and the other word on another line. 我希望按钮在一行上显示一个单词,在另一行上显示另一个单词。 For example, 例如,
TestTestTest/ TestTestTest /
FooFooFooFoo FooFooFooFoo
I don't want the text to wrap, I want to force the second word onto another line. 我不想换行,我想将第二个单词强制放在另一行。 Below is sample code: 下面是示例代码:
http://jsfiddle.net/VM723/ http://jsfiddle.net/VM723/
.BtnSize {
width: 125px;
}
<input type="button" value="TestTestTest/ FooFooFooFoo" class="BtnSize" />
try 尝试
.BtnSize {
width: 125px;
white-space:normal;
word-break: break-all;
}
http://www.w3schools.com/cssref/css3_pr_word-break.asp http://www.w3schools.com/cssref/css3_pr_word-break.asp
尝试这个:
<button type="button">TestTestTest/ FooFooFooFoo</button>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.