单行文本的省略

text-overflow,自动添加‘...’号

中文

君不见,黄河之水天上来,奔流到海不复回。君不见,高堂明镜悲白发,朝如青丝暮成雪。人生得意须尽欢,莫使金樽空对月。天生我材必有用,千金散尽还复来。烹羊宰牛且为乐,会须一饮三百杯。岑夫子,丹丘生,将进酒,杯莫停。

英文

It was a pleasant afternoon in the month of July, 1642, when three young people sat together on a shady bank at the edge of a wood some three miles from Oxford. The country was undulating

淡出渐变+pseudo

中文

君不见,黄河之水天上来,奔流到海不复回。君不见,高堂明镜悲白发,朝如青丝暮成雪。人生得意须尽欢,莫使金樽空对月。天生我材必有用,千金散尽还复来。烹羊宰牛且为乐,会须一饮三百杯。岑夫子,丹丘生,将进酒,杯莫停。

英文

It was a pleasant afternoon in the month of July, 1642, when three young people sat together on a shady bank at the edge of a wood some three miles from Oxford. The country was undulating

自定义实现text-overflow

中文

君不见,黄河之水天上来,奔流到海不复回。君不见,高堂明镜悲白发,朝如青丝暮成雪。人生得意须尽欢,莫使金樽空对月。天生我材必有用,千金散尽还复来。烹羊宰牛且为乐,会须一饮三百杯。岑夫子,丹丘生,将进酒,杯莫停。

英文

It was a pleasant afternoon in the month of July, 1642, when three young people sat together on a shady bank at the edge of a wood some three miles from Oxford. The country was undulating

注:这种效果并不好,因为会出现半个字体的问题,除非'p'元素的宽度用'em'来代替。使用‘淡出’是更好的方案,但是这种方案可以定义各种省略符号。
注:前提是不用js的情况下,只使用css。