簡體   English   中英

我不需要較舊的瀏覽器支持,那么IE11是否需要modernizr?

[英]I do not need support for older browser then IE11 do I need modernizr?

我開始了解H5BP和modernizr。 現在,我已經開發了使用flexbox創建的網站,並且我不希望支持比IE11更舊的瀏覽器。 (因為我不在乎IE 6到10)。

現在我已經看到modernizr檢測到瀏覽器支持,並告訴您添加“ no-XYZ”類以使其適用於較舊的瀏覽器。 但我不想做那么辛苦的工作以使其在IE6到IE10中都能正常工作。 我應該刪除modernizr嗎? 來自H5BP嗎?

我已經在使用HTML5SHIV。

Modernizr並不是要讓您使用其他瀏覽器,而是要讓您知道是否在用戶當前的瀏覽器中啟用了功能。 在向網站添加功能時,請在caniuse.com上檢查其兼容性。 如果不是出色的支持,請考慮使用Modernizr進行后備。

HTM5 and CSS3 are the latest versions and have advanced features which are not supported by the older browser engines. To detect these features in browser we will use modernizr library.

Ex : 

    if (Modernizr.canvas) {
        alert("This browser supports HTML5 canvas!");
      } else{
        alert("This browser does not supports HTML5 canvas!");
    }

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM