我正在一个项目中,我有一个响应网格,我已经实现使用flex wrap属性。由于我支持IE9和较低版本的Firefox,版本28及以下,我如何找到,通过javascript,支持相同。目前我只能通过条件语句识别IE9浏览器,但现在任何人现在如何通过javascript来检测Firefox旧版本。
I am working on a project in which I have a responsive grid which I have achieved using flex wrap property. Since I am supporting IE9 and lower versions of Firefox, version 28 and below, how do I find out, through javascript, the support for the same. Currently I have only been able to identify IE9 browser through conditional statement but does anyone now how to detect for Firefox older versions through javascript.
推荐答案
Modernizr(modernizr/ )是为此而构建的,是一种广泛使用的特征检测库。查看CSS功能,他们确实支持检测flexbox( modernizr/docs/#features-css),并将一直回到IE6。
Modernizr (modernizr/) was built for this and is a widely used library for feature detection. Looking at the CSS features they do support detection for flexbox (modernizr/docs/#features-css) and will work all the way back to IE6.
更多推荐
检测浏览器中的flex
发布评论