是否有一个CSS选择器将选择溢出文本的元素? [英] Is there a CSS selector that will select elements with overflowing text?
本文介绍了是否有一个CSS选择器将选择溢出文本的元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以编写一个css选择器,只选择文本溢出行为被调用的元素?
Is it possible to write a css selector that only selects elements where the text-overflow behavior has been invoked?
<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>
推荐答案
没有CSS选择器可以选择发生溢出的元素。
No there's no CSS selector with which you can select elements where overflow occurs.
这篇关于是否有一个CSS选择器将选择溢出文本的元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文