是否有转向HTML 5仍然承诺多浏览器兼容的方法吗? [英] Is there any way of moving to HTML 5 and still promise multi browser compatibility?

查看:100
本文介绍了是否有转向HTML 5仍然承诺多浏览器兼容的方法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个设计师,其主要的营销策略是多浏览器的兼容性。我保证我的客户,该网站将在IE6甚至工作(!)。

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

近来我一直在琢磨转向HTML 5背着我AP prehension的原因的问题是,IE6仍然是在市场份额方面的主要球员,我不想失去它。

Of late i have been pondering over the question of moving to HTML 5. The reason behind my apprehension is that IE6 is still a major player in terms of market share and i don't want to lose it.

有转向HTML 5仍然承诺多浏览器兼容的方法吗?

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

感谢您。

推荐答案

是的,通过采取婴儿的步骤。

Yes, by taking baby steps.

要开始,你可以切换到HTML5文档类型:< D​​OCTYPE HTML> !这种切换几乎所有的浏览器在那里为标准模式,同一个HTML 4严格的DOCTYPE。

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

然后有新的元素。 Internet Explorer无法本身他们的风格,但JavaScript的一个方便的一点修复起来:的http:// code.google.com / p / html5shiv /

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/

如果你或你的工具都没有准备好(例如一些内容管理系统剔除的HTML标签,他们不明白),那么在此期间,你可以使用类,例如而不是&lt;物品&GT; ,使用&LT; D​​IV CLASS =文章方式&gt;

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 <article>, use <div class="article">.

至于新的表单控件,它们是向后兼容了。因此,&LT;输入类型=电子邮件&GT; 将工作完全方法一样&LT;输入类型=文本&GT; 在不支持它的浏览器。如果需要的话可以使用JavaScript来填补空白。请参见 http://diveintohtml5.ep.io/forms.html 了解这一点。

As for the new form controls, they're backwards compatible too. So <input type="email"> will work exactly the same way as <input type="text"> 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.

至于&lt;视频&GT; &LT;音频&GT; ,你可以回落到&LT;对象&gt; 旧版本浏览器 - 例如<一href=\"http://camendesign.com/$c$c/video_for_everybody\">http://camendesign.com/$c$c/video_for_everybody.与此同时&LT;&帆布GT; 可以在JavaScript中模拟,例如 HTTP://$c$c.google.com/p/explorercanvas/

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

这篇关于是否有转向HTML 5仍然承诺多浏览器兼容的方法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆