3.3 KiB
3.3 KiB
| title | layout |
|---|---|
| Internet Explorer | default |
IE7+ only
- Selectors:
>(descendant)[attr](attribute).class1.class2(multiple classes)~(sibling)
- CSS properties:
max-widthposition: fixed
IE8+ only
- Selectors/pseudos: (polyfill: selectivizr)
+(adjacent):first-child1:focus:before,:after(single colon only)
- CSS properties:
outlinedisplay: inline-block2display: tableborder-collapse,border-spacing,table-layout, ...whitespace: pre-wrapwhitespace: pre-linebox-sizing
- Features:
- PNG alpha transparency
data:URI
- JS features:
- JSON parsing
- Cross-origin resource sharing
IE9+ only
- Selectors/pseudos: (polyfill: selectivizr)
:first-of-type,:last-of-type:last-child:empty:enabled,:disabled,:checked:not():nth-child(),:nth-last-child(),:nth-of-type(),:nth-last-of-type(),:only-of-type():only-child():target::selection
- CSS properties:
background-clipbackground-originbackground-sizebackground: x, y, z(multiple backgrounds)opacityborder-radiusbox-shadowrgba()transform
- CSS features:
@mediaqueries (polyfill: respond.js)
- HTML5 features:
<canvas><svg><img src='image.svg'>
IE10+ only
- CSS features:
animationtransitionlinear-gradient()
- HTML features:
<input placeholder='..'><input type='range'>
- JS features:
- Web sockets
Not in IE10 (or below) at all
text-shadow(polyfill)
Polyfills
Always install these in almost every project:
- selectivizr for selectors
- html5shiv for new HTML tags
- json2 for JSON parsing (IE7 below)
- respond for media queries
You may also need these:
- modernizr for feature detection and new HTML tags
for CSS3 decorations:
Also see:
Misc
IE Conditional comment HTML
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
<!--[if IE 7 ]> <html class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]-->
IE conditionals
<!--[if IE]> I'm IE <![endif]-->
<!--[if !IE]> --> Not IE <!-- <![endif]-->
Footnotes
- (1) = doesn't work for elements inserted via JS
- (2) = IE6/7 can only support inline-block for elements that are naturally inline, like span