How to check if css value is supported by the browser?

前端 未结 6 1466
温柔的废话
温柔的废话 2020-12-14 17:06

Im not very skilled in javascript so please be bear with me. Safari 6 and below and older android mobile browsers and maybe more do not support the css value VH. My DIV#id o

6条回答
  •  悲哀的现实
    2020-12-14 17:34

    I'd suggest to use Modernizr.

    Modernizr is a JavaScript library that detects which HTML5 and CSS3 features your visitor's browser supports. In detecting feature support, it allows developers to test for some of the new technologies and then provide fallbacks for browsers that do not support them.

    Some useful links:

    • Modernizr: the feature detection library for HTML5/CSS3

    • Using Modernizr to detect HTML5 features and provide fallbacks

    • HTML5 Boilerplate custom build of Modernizr for feature detection

提交回复
热议问题