浏览器支持 CSS :first-child 和 :last-child [英] Browser support for CSS :first-child and :last-child

查看:25
本文介绍了浏览器支持 CSS :first-child 和 :last-child的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道哪些浏览器/版本支持它们吗?

Does anyone know which browsers/version support them?

使用它们是否安全,还是应该使用 PHP/javascript 来生成第一个/最后一个类?

Is it safe to use them, or should I resort to PHP / javascript to generate first/last classes?

推荐答案

:first-child:last-child,以及免费的 兼容性图表.

:first-child 正确支持 IE9,以及 IE7 和 IE8(见图表).

:first-child is supported IE9 properly, and IE7 and IE8 sort of (see chart).

:last-child 仅 IE9+ 支持.

:last-child is supported by IE9+ only.

好的浏览器都支持它们.

Both of them are supported well by the good browsers.

这篇关于浏览器支持 CSS :first-child 和 :last-child的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆