:nth-child()和::before

发布于 7 年前作者 fanghan3324 次浏览最后编辑 7 年前来自 ask

在开发过程中遇到需要用:nth-child()选择其中一个view 同时需要使用::before添加访问前的样式,但这两中可以同时使用吗

:nth-child()and::before 我这样写不作用

1 回复
nluo
nluo1 楼5 年前

view:nth-child(1)::before

这种格式就可以了,不用and