是否有CSS选择器来显示在视图中,即在视口中可见?
您必须使用Javascript来实现。现代的方法是使用getBoundingClientRect()。
getBoundingClientRect()