简体   繁体   中英

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. 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:

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>

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM