سؤال

أعرف أن هناك الكثير من الأسئلة الجيدة على الموقع حول هذه المكتبات البرنامجين.

أردت أن أسأل شيئا لا أستطيع أن أجده في أي منهم.

ماذا يفعل modernizr توفر ذلك html5shiv لا يتم الخروج من المربع، أي فقط بما في ذلك البرنامج النصي.

أعرف html5shiv "فقط" إصلاح عناصر HTML5 ل IE <9، هل يتوقف الدعم هناك؟

هل يعمل ModernizR على إصلاح مشكلات CSS3 على الملاحين IE؟هل Ie9.js تفعل ذلك؟(وأعني هذا السؤال المحدد خارج الصندوق، دون رمز JS إضافي للتعامل مع حالات الزاوية)

ما هي مزايا modernizr عبر html5shiv عندما تأخذ في الاعتبار باستخدام المكتبة إلى جانب فقط بما في ذلك البرنامج النصي؟

هل كانت مفيدة؟

المحلول

They do different things.

Modernizr detects the availability of features in a page allowing you to provide your own polyfills for older browsers should you require that functionality. You can add support for <canvas> using a canvas tag polyfill so that canvas functionality, including it's JavaScript interface, in browsers that don't support the <canvas> tag.

Html5shiv adds the new html5 tags that aren't available (<section>, <header>, etc) to older browsers. It also creates the default styles (display: block for <section> for example).

That's it. It provides no other functionality.

نصائح أخرى

Modernizr 1.5+ actually includes HTML5Shiv, so if you use it, shiv is redundant. Source: http://modernizr.com/docs/#html5inie

"As of Modernizr 1.5, this script is identical to what is used in the popular html5shim/html5shiv library."

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top