Is there any way of moving to HTML 5 and still promise multi browser compatibility?

后端 未结 5 1669
囚心锁ツ
囚心锁ツ 2021-01-31 18:00

I am a designer whose main marketing strategy is multi browser compatibility. I assure my clients that the site will work even in IE6 (!).

Of late i have been pondering

5条回答
  •  北海茫月
    2021-01-31 18:36

    Yes, by taking baby steps.

    To start with, you can switch to the HTML5 doctype: . This switches just about every browser out there into "standards" mode, the same as an HTML 4 strict doctype.

    Then there's the new elements. Internet Explorer can't natively style them, but a handy little bit of javascript fixes that up: http://code.google.com/p/html5shiv/

    If you or your tools aren't ready for that (e.g. some CMSs strip out HTML tags they don't understand), then in the interim you could use classes, e.g. instead of

    , use
    .

    As for the new form controls, they're backwards compatible too. So will work exactly the same way as in browsers that don't support it. If necessary you can use javascript to fill in the gaps. See http://diveintohtml5.ep.io/forms.html for more on that.

    As for and , you can fall back to for older browsers - e.g. http://camendesign.com/code/video_for_everybody. Meanwhile can be emulated in javascript, e.g. http://code.google.com/p/explorercanvas/.

    提交回复
    热议问题