是否有一个CSS选择器可以选择带有溢出文本的元素?

前端之家收集整理的这篇文章主要介绍了是否有一个CSS选择器可以选择带有溢出文本的元素?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
是否可以编写一个只选择调用了文本溢出行为的元素的css选择器?
<div style="width: 200px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis">
I don't want to select this
</div>

<div style="width: 200px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis">
But I do want to select this because it's overflowing
</div>

Fiddle

解决方法

没有没有CSS选择器可以用来选择发生溢出的元素.
原文链接:https://www.f2er.com/css/242358.html

猜你在找的CSS相关文章