Skip to content

Instantly share code, notes, and snippets.

@foru17
Last active August 29, 2015 13:58
Show Gist options
  • Save foru17/10341280 to your computer and use it in GitHub Desktop.
Save foru17/10341280 to your computer and use it in GitHub Desktop.
固定宽度过长文件省略样式
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100px;//需要设置一个宽度
//多行文字,最后一行省略号
overflow:hidden;
text-overflow:ellipsis;
display: –webkit-box;
-webkit-line-clamp:2; //在第几行加省略号
-webkit-box-orient:vertical;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment