Open Lauviah0622 opened 4 years ago
先講單行的情況,蠻直覺的
多行:就看下面幾篇文章吧 一個小插件,不過沒有看他怎麼實現的 https://dotdotdot.frebsite.nl/
https://css-tricks.com/line-clampin/ http://hackingui.com/front-end/a-pure-css-solution-for-multiline-text-truncation/ https://web.archive.org/web/20160506153100/http://www.mobify.com/blog/multiline-ellipsis-in-pure-css/
大概看一下,好像有幾個思路
content: ...
,稍微獎感覺很簡單,不過應該有很多東西要調整的,這個方法的難點是讓偽元素接在文字後面而不是接在區塊外面。
多行情況
https://stackoverflow.com/questions/33058004/applying-an-ellipsis-to-multiline-text
平常怎麼設定?