簡體   English   中英

按鈕文字不會換行IE11(Chrome,IE9可以)

[英]Button text won't line break IE11 (Chrome, IE9 fine)

我試圖在兩個單詞之間強制換行。 它可以在最新版本的Chrome和IE9中使用。 但是,它在IE11中不起作用。 我希望按鈕在一行上顯示一個單詞,在另一行上顯示另一個單詞。 例如,

TestTestTest /
FooFooFooFoo

我不想換行,我想將第二個單詞強制放在另一行。 下面是示例代碼:

http://jsfiddle.net/VM723/

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

嘗試

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM