Wrap text from bottom to top

后端 未结 8 913
长发绾君心
长发绾君心 2020-12-06 09:55

Anybody know how I could wrap the text in reverse order, from bottom to top? I attached an example image.

[\"\"

8条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-06 10:18

    Well, if that is depending on the text, then you can try something like a word replacer. For example

    var words = "This is what I want to achieve";
    var newWords.replace("what", "what 
    "); // note the line break document.write(newWords);

    Here is a fiddle for you: http://jsfiddle.net/afzaal_ahmad_zeeshan/Ume85/

    Otherwise, I don't think you can break a line depending on number of characters in a line.

提交回复
热议问题