I am trying to force a line break between two words. It works in the latest version of Chrome and IE9. However, it doesn't work in IE11. I want the button to show one word on one line and the other word on another line. For example,
TestTestTest/
FooFooFooFoo
I don't want the text to wrap, I want to force the second word onto another line. Below is sample code:
.BtnSize {
width: 125px;
}
<input type="button" value="TestTestTest/ FooFooFooFoo" class="BtnSize" />
try
.BtnSize {
width: 125px;
white-space:normal;
word-break: break-all;
}
尝试这个:
<button type="button">TestTestTest/ FooFooFooFoo</button>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.