css选择第一个标签,倒数第二个标签,最后一个标签总结

版权声明:本文为博主原创文章,未经博主同意不得转载 https://blog.csdn.net/qq_38215042/article/details/85067738

注意事项:“:”冒号前后不能有空格!!!
选择第一个标签

例如:span:nth-child(1)

选择倒数第二个标签

例如:p:nth-last-child(2)

选择最后一个标签:

例如:p:last-child

猜你喜欢

转载自blog.csdn.net/qq_38215042/article/details/85067738