mt1992
V2EX  ›  CSS

CSS 能力检测

  •  
  •   mt1992 · Apr 6, 2019 · 3715 views
    This topic created in 2626 days ago, the information mentioned may be changed or developed.

    有些时候我们可能需要使用一些 css 的新特性,然后由于浏览器兼容的问题,我们必须 js 判断浏览器是否支持 该 css 特效,如果不支持就使用 js 来实现该功能,所以我们需要一个能检测 css 能力支持的功能。比如说沾性(sticky)布局,就是那种滚动顶部就吸顶的效果,如果不支持这个功能,就需要 js 来实现。

    这里有个库就实现了这个功能,希望对大家有所帮助。

    https://github.com/txs1992/mt-utils#csssupports-css-%E8%83%BD%E5%8A%9B%E6%A3%80%E6%B5%8B

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3861 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 04:20 · PVG 12:20 · LAX 21:20 · JFK 00:20
    ♥ Do have faith in what you're doing.