HTML5和CSS3 for IE7和IE8 [英] HTML5 and CSS3 for IE7 and IE8

查看:133
本文介绍了HTML5和CSS3 for IE7和IE8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继承了一个Web应用程序,其中前端使用新的HTML5标签(标题,导航,部分标签)和新的CSS3样式属性(圆角边框)。该网站在Google Chrome和Safari中看起来惊人。

I inherited a web application where the front end uses new HTML5 tags (header, nav, section tags) and new CSS3 style attributes (rounded borders). The website looks amazing in Google Chrome and Safari.

但是,客户现在抱怨该网站已损坏的IE7和IE8。

However, the client now complains the website is broken for IE7 and IE8. Everything is out of alignment and most of the styles do not render.

什么是最简单的方法使这个网站在IE7和IE8的工作?我必须:
a)应用一些黑客,使IE浏览器接受新的HTML5和CSS3的功能?
b)完全重写前端?

What is the easiest way to make this website work in IE7 and IE8? Do I have to: a) Apply some hack to make IE browsers accept the new HTML5 and CSS3 features? b) A complete rewrite of the front end?

推荐答案

尝试这个可爱的脚本(.js) :)

对于圆角我使用其他脚本(.htc)

使用第一个:

<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

使用第二个:

-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-khtml-border-radius: 4px;
border-radius: 4px;
behavior: url(border-radius.htc);

Happy sitebuilding:)

Happy sitebuilding :)

链接已不再有效,HTML5shiv已移动。

The original link is no longer active and HTML5shiv has moved.

现已在GitHub上可用

Now available on GitHub

https://github.com/aFarkas/html5shiv

这篇关于HTML5和CSS3 for IE7和IE8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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