wrapping text words in new line

后端 未结 8 729
眼角桃花
眼角桃花 2021-02-10 04:53

I\'m using the below code for wrapping long text, entered by users in a text area for commenting:

function addNewlines(comments) {
  var result = \'\';
  while (         


        
8条回答
  •  一整个雨季
    2021-02-10 05:12

    I use this css code for displaying in Torch browser and it works

    I've tried word-wrap:break-word;overflow:ellipsis;....etc, but didn't work.

    #xxx{
    
     width: 750px;
     word-break: break-word;
    
    }
    

提交回复
热议问题