检测浏览器中的flex

编程入门 行业动态 更新时间:2024-10-26 23:37:14
本文介绍了检测浏览器中的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(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

本文发布于:2023-08-02 18:58:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1280284.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:器中   flex

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!