Use CSS to automatically truncate text without using a program and replace it with ellipses_Experience exchange

WBOY
Release: 2016-05-16 12:06:44
Original
1564 people have browsed it

.test{
width:200px;
height:50px;
border:1px solid red;
padding:10px;
overflow:hidden; /*Do not display content that exceeds the width of the object* /
text-overflow:ellipsis; /*Display an ellipsis mark (...) when the text in the object overflows*/
white-space:nowrap; /*Limit all text to be displayed in one line*/
}


[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh it to execute]
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!