| Код | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <style type="text/css"> #project {position:fixed;top:200px;left:0px; height:10px;width:10px; background:url('png.png') green; backgroundPosition:bottom center; backgroundRepeat:no-repeat;} </style> <script type="text/javascript"> function getElementComputedStyle(elem, prop) { if (typeof elem!="object") elem = document.getElementById(elem); if (document.defaultView && document.defaultView.getComputedStyle) { if (prop.match(/[A-Z]/)) prop = prop.replace(/([A-Z])/g, "-$1").toLowerCase(); return document.defaultView.getComputedStyle(elem, "").getPropertyValue(prop); } if (elem.currentStyle) { var i; while ((i=prop.indexOf("-"))!=-1) prop = prop.substr(0, i) + prop.substr(i+1,1).toUpperCase() + prop.substr(i+2); return elem.currentStyle[prop]; } return ""; } </script> </head> <body> <div id="project">qqq</div><br><br><br><br><br> <input type="button" onclick="alert(getElementComputedStyle('project','backgroundPosition'))" value="kll" > </body> </html>
|
дальнейший гемморой с оперой оставляю за вами |