dracoblue.net

Morph css background-position in Internet Explorer

If you try to set the CSS-property

background-position in Internet Explorer (I tested with 7) and even use that with Mootools' morph/tween-functions, it will not work.

You can workaround that issue, if you set also background-position-x and background-position-y (actually ignored by my Firefox 3.0).

This is the code, I use at koala to move the background upwards.

$('body').morph({
    'background-position':'0 -140px',
    'background-position-y':'-140px',
});
In css, internet explorer, javascript, mootools by
@ 16 Jun 2009, Comments at Reddit & Hackernews

Give something back

Were my blog posts useful to you? If you want to give back, support one of these charities, too!

Report hate in social media Campact e.V. With our technology and your help, we protect the oceans from plastic waste. Gesellschaft fur Freiheitsrechte e. V. The civil eye in the mediterranean

Recent Dev-Articles

Read recently

Recent Files

About