0

嗨,伙计们,我想知道如何将自动换行到 3 行这是我的代码

$string = "this is a long string that i want condensed isjdjfibfhkbfhdbfsdbfsdhfbdsfhsbdhfkhvbsdhvshfsdjkvfjhjfdsffsdfsdfdsfdshfbdkhsvfvdfdhfsdvf";
echo wordwrap($string,55,"<br />\n",TRUE);
4

2 回答 2

0
.wordwrap {  
    word-wrap: break-word;
 }  
于 2013-03-23T19:06:17.043 回答
0

您可以将文本放在div具有 style 的块元素或其他块元素中overflow = scroll

于 2013-03-23T19:12:39.957 回答