How to set background-position-x with IE
I'm tired of setting background-position-x
with IE, $('.scroller').css('background-position-x', posX+'px');
is not woking, any other methods
var posX = $('.scroller').css('background-position');
if(typeof(posX) === 'undefined')
{
posX = $(' .开发者_开发问答scroller').css('background-position-x');
}
posX = posX.split(" ",1);
posX = parseInt(posX,10);
posX = (posX > 100 ) ? 0 : posX+1;
if(isIE()){
$('.scroller').css('background-position-x', posX+'px');
} else {
$('.scroller').css('background-position', posX+'px center');
}
In IE8 standards mode, you have to call it "-ms-background-position-x".
精彩评论