检测浏览器中的flex-wrap支持 [英] Detecting flex-wrap support in browsers

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

问题描述

我正在一个项目中,我有一个响应网格,我已经实现使用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(http://modernizr.com/ )是为此而构建的,是一种广泛使用的特征检测库。查看CSS功能,他们确实支持检测flexbox( http://modernizr.com/docs/#features-css),并将一直回到IE6。

Modernizr (http://modernizr.com/) was built for this and is a widely used library for feature detection. Looking at the CSS features they do support detection for flexbox (http://modernizr.com/docs/#features-css) and will work all the way back to IE6.

这篇关于检测浏览器中的flex-wrap支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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