background-attachment: fixed per IE
"background-attachment: fixed" in explorer è mal supportato. Può essere sfruttato facilmente nel body o nel caso in cui si forza lo scrolling della pagina con :
box{
overflow: auto;
width: 300px;
height: 150px;
}
http://www.quirksmode.org/css/background/background2.html
Per gli altri casi una soluzione può essere:
http://www.howtocreate.co.uk/fixedBackground.html
<!--[if IE]><script type="text/javascript">
function correctPosition(oElement,oPos,oWhich) {
while( oElement.offsetParent ) {
oPos -= oElement['offset'+oWhich];
oElement = oElement.offsetParent;
}
oPos += document.documentElement['scroll'+oWhich] ? document.documentElement['scroll'+oWhich] : document.body['scroll'+oWhich];
return oPos;
}
document.writeln( '<style type="text\/css">' );
//use document.writeln to put all CSS declarations in here, surrounded by " quotes
document.writeln( "box { background-position: expression( correctPosition(this,10,'Left')+'px '+correctPosition(this,20,'Top')+'px'); }" );
document.writeln( '<\/style>' );
</script><![endif]-->
Modificato da S6uRoN 11/02/2005 21.36