Skip to content
New issue

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

文本截断 #73

Open
l-hammer opened this issue Feb 23, 2019 · 2 comments
Open

文本截断 #73

l-hammer opened this issue Feb 23, 2019 · 2 comments

Comments

@l-hammer
Copy link
Owner

https://lhammer.cn/You-need-to-know-css/#/zh-cn/text-truncate

You-need-to-know-css,CSS tricks web developers need to know

@l-hammer l-hammer changed the title 文本截断 - CSS Tricks 文本截断 Feb 23, 2019
@2601178727
Copy link

多行文本截断在火狐上会有兼容问题,大众的解决方案是用伪类模拟... 笔者有什么优雅的解决方案么?

@l-hammer
Copy link
Owner Author

l-hammer commented Mar 7, 2019

@2601178727 纯CSS并不能完美的实现多行文本截取,目前比较巧妙的方案都是通过float + 伪元素 + 渐变实现,如果想优雅的实现还是建议通过JS来实现,推荐看下shave这个库~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants