html5为什么不兼容低版本的浏览器?
高洛峰
高洛峰 2017-04-17 11:14:04
0
14
1337

项目组用html5开发的产品,放到低版本的浏览器样式全乱了,有没有什么好的解决办法?在线等...

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(14)
Ty80

I think the title should be called Why are older browsers not compatible with new technologies! ! ! Better

This is like requiring iPhone 5 and older devices to support fingerprint recognition. I can’t do that!

小葫芦

When I create a page, I just use the low-version browser hack to ensure that the page layout is not messy and add tags

<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>

Let domestic dual-core browsers use the chrome kernel to parse.
In fact, there are really not many users in China who use IE6 and IE8. The vast majority of XP users use domestic dual-core such as 360.

In addition 360 has its own tag

<meta name="renderer" content="webkit">

Can force the use of Webkit kernel rendering.
See: http://se.360.cn/v6/help/meta.html
If you really want to use the effect in lower version browsers, there seems to be such a JS library, you can look for it.

小葫芦

Go and give me something that will only be available in the future and try it! ! !

The advancement of computer technology, in addition to extensions that do not destroy the old implementation, is inevitably accompanied by drastic deprecations and fixes. In fact, I think the questioner just accidentally ignored these two possibilities, rather than there really being an IQ problem that hinders understanding of technological progress.

小葫芦

html5 products cannot run on lower versions

The above statement is too absolute. It depends on whether the developer considers compatibility with lower version browsers during development and what functions are implemented.
First of all, we need to understand what functions html5 implements.

  • Local storage function
  • canvas
  • files api
  • video,audio
    . . .

These functions are not supported by HTML in lower versions. If this function is used, it will definitely not run.

The original poster said that the style is confusing, the reason should be

  1. A large number of new HTML tags are used, which are not recognized by IE7 and below and cannot be parsed. The general solution is to createElement a tag with the same name.
  2. It should use more CSS3 styles, which cannot be used in old browsers. For example, the layout method is very different.

. . .

So, if the author wants to see whether it can be viewed normally in other browsers, please consult your front-end technical staff.

巴扎黑

If you want to be compatible with lower versions, don't use html5. Compatibility is difficult to guarantee. Please confirm compatibility before writing it in

洪涛

Add the following sentence in the head tag

<!--[if lt IE 9]>
  <script src="http://cdn.staticfile.org/html5shiv/r29/html5.js"></script>
<![endif]-->
Peter_Zhu

html5 is a standard. Do we need standards to accommodate outdated things? Standards mean that others must abide by them. It can only be said that lower version browsers cannot support new standards. Technology is advancing and metabolism is inevitable!

伊谢尔伦

How do you make it compatible with something that doesn't exist?

When IE6 7 came out, html5 was not yet a standard, so why should we be compatible with a non-standard thing

PHPzhong

I want to ask, are you a technician?

黄舟

Everyone has said it before.

In order to make lower version browsers (don’t look, I’m talking about you IE!) compatible with html5 tags, add html5shiv.js.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template