Home > Web Front-end > HTML Tutorial > 显示字符长度_html/css_WEB-ITnose

显示字符长度_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:02:49
Original
1154 people have browsed it


这样的结构  我想在{item.name}输出的字符只显示前3位剩下的用省略号显示。标签里的style都是内嵌的,试过在style里加 overflow:hidden;text-overflow: ellipsis; 好用的时候第二个标签的icon就没显示了 .  有没有别的方法可以只显示{item.name}前三个字符剩下的用省略号


回复讨论(解决方案)

只输出三位加省略号不就可以了

只输出三位加省略号不就可以了


我真是  问题是怎么输出

substr()

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template