Home  >  Article  >  Web Front-end  >  How to set overflow hiding in html

How to set overflow hiding in html

coldplay.xixi
coldplay.xixiOriginal
2021-04-28 10:45:0713545browse

htmlHow to set overflow hiding: 1. To set overflow hiding in a single line, the code is [overflow: hidden]; 2. To set overflow hiding in multiple lines, the code is [display: -webkit-box].

How to set overflow hiding in html

The operating environment of this tutorial: windows7 system, html5 version, DELL G3 computer.

htmlHow to set overflow hiding:

Single line:

overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;

Multiple lines:

display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;

Related learning recommendations : html video tutorial

The above is the detailed content of How to set overflow hiding in html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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