是否可以编写一个 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>
最佳答案
不,没有 CSS 选择器可以用来选择发生溢出的元素。
关于css-selectors - 是否有一个 CSS 选择器可以选择带有溢出文本的元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16865167/