geeeger / blog

https://loofp.com
1 stars 0 forks source link

inline-block 文字溢出? #38

Open geeeger opened 3 years ago

geeeger commented 3 years ago

先来看看尴尬场景

QQ图片20210429141107

好的,看完了,里面的 | 是一个 font-icon, content format 是 inline-block。于是就出现了这样的奇特场景。 解决方式也很简单,我们把 fonticon的盛放容器改为 inline format... 让其可以参与到父容器的text-overflow计算中。