We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
老早之前的技能了,整理笔记发现的,不知道的可以看下:
html:
<p class="one">单行文本溢出显示省略号</p> <p class="moreLine">多行文本溢出显示省略号 啦啦啦啦啦啦 哈哈哈哈</p>
css:
.one{ width:100px; /* 记住要限定宽度 */ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .moreLine{ width:100px; /* 记住要限定宽度 */ /* height:300px; */ /* 也要限制高度,这边是自适应了 */ display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; /* 限定几行文字溢出 */ overflow: hidden; }
.one{ width:100px; /* 记住要限定宽度 */ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .moreLine{ width:100px; /* 记住要限定宽度 */ /* height:300px; */ /* 也要限制高度,这边是自适应了 */ display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; /* 限定几行文字溢出 */ overflow: hidden;
}
博客链接
The text was updated successfully, but these errors were encountered:
No branches or pull requests
博客链接
# 单行、多行文本溢出
老早之前的技能了,整理笔记发现的,不知道的可以看下:
# codepen
# 代码
html:
css:
# 点个Star支持我一下~
博客链接
The text was updated successfully, but these errors were encountered: