Home > Web Front-end > HTML Tutorial > css中text-overflow:ellipsis文本溢出产生省略号_html/css_WEB-ITnose

css中text-overflow:ellipsis文本溢出产生省略号_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:08:26
Original
1456 people have browsed it

text-overflow : clip | ellipsis
参数:
  clip :  不显示省略标记(...),而是简单的裁切 (PS:clip这个参数是不常用的!)
  ellipsis :  当对象内文本溢出时显示省略标记(...)


text-overflow属性仅是注解,当文本溢出时是否显示省略标记。并不具备其它的样式属性定义。

想要实现溢出文本时产生省略号的效果:

必须定义:1、强制文本在一行内显示(white-space:nowrap);

                2、溢出内容为隐藏(overflow:hidden);

                3、溢出时显示省略号(text-overflow:ellipsis).

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