超出部分用省略號用javascript可以弄嗎?有什么插件么?
比如這個demo,https://jsfiddle.net/kanjiushi/pg7c78qe/
只想保留一行,如果超出一行文字,不用換行,直接省略掉。
另外,php省略,那個函數(shù)名叫什么來著?一下忘了。
光陰似箭催人老,日月如移越少年。
用CSS 就可以了
text-overflow:ellipsis
overflow:hidden
white-space:nowrap
laravel:$value = str_limit('The PHP framework for web artisans.', 7);// The PHP...
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號