简体   繁体   中英

CSS3 properties in IE7/IE8

I am looking at implementing some of the common CSS3 properties to work in IE7/8.

The CSS properties include;

-moz-border-radius
-moz-linear-gradient

For the above, I already tried using the following for IE7/8, which do not work;

border-radius;
filter: progid:DXImageTransform.Microsoft.gradient...

I am really confused if it is even possible to make these work in IE8 even with workarounds..

Also not sure if adding the IE enabling script (html5.js) available online would make any difference to the way the CSS gets applied. Please clarify.

Thank you.

No, those won't work in IE 7/8. Give CSS3PIE a look.

These CSS properties don't work in IE7/8 simply because they aren't supported in them; they were introduced much later after their release :)

You can use CSS3 PIE , but that will slow down page rendering (and well, those versions of IE are already pretty slow at rendering), and in addition, not all CSS3 properties are supported, and you'll also need to add some extra properties as set out by the docs.

There's also CSS3 Please , which lets you generate CSS for all browsers including IE, where equivalent functionality is supported . You can get an idea of what works and what doesn't by loading that page up in both IE and another browser.

As for html5.js , it's simply a script that allows IE7/8 to render elements introduced in HTML5 as intended, as they would otherwise ignore the tags completely.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM