<!DOCTYPE html>charset="utf-8"W3Cschool教程(w3cschool.cn)p:nth-last-child(3n+0){background:#ff0000;}The first paragraph.The second paragraph.The third paragraph.The fourth paragraph.The fifth paragraph.The sixth paragraph.The seventh paragraph.The eight paragraph.The ninth paragraph.注意: Internet Explorer 8 以及更早版本的浏览器不支持:nth-last-child()属性.