经常要给button加上
cursor: pointer
smarty truncate:
assign('articleTitle','Two Sisters Reunite after Eighteen Years at Checkout Counter.');
?>
{$articleTitle}
{$articleTitle|truncate}
{$articleTitle|truncate:30}
{$articleTitle|truncate:30:""}
{$articleTitle|truncate:30:"---"}
{$articleTitle|truncate:30:"":true}
{$articleTitle|truncate:30:"...":true}
{$articleTitle|truncate:30:'..':true:true}
Two Sisters Reunite after Eighteen Years at Checkout Counter.
Two Sisters Reunite after Eighteen Years at Checkout Counter.
Two Sisters Reunite after...
Two Sisters Reunite after
Two Sisters Reunite after---
Two Sisters Reunite after Eigh
Two Sisters Reunite after E...
Two Sisters Re..ckout Counter.
// Paras:
// pos type required default desc
// 1. integer no 80 determines how many characters to truncate to.
// 2. string no ... a text string that replaces the truncated text,its length is included in the truncation length setting.
// 3. boolean no false determins whether or not to truncate a word boundary with false,or at the exact character with true.
// 4. boolean no false determins whether the truncation happens at the end of the string with false,or in the middle of string with true,note that if the setting is true,then word boundaries is ignored.