首页 > background-position-x在火狐下的兼容性问题?

background-position-x在火狐下的兼容性问题?

通过jquery需要动态修改background-position的两个参数
正常情况下可以这么写,

    $(".big").css("background-position-x",bigX);
    $(".big").css("background-position-y",bigY);

但是为了兼容火狐,怎么把两个参数都传给background-position


jquery $(".big").css({"background-position":bigx+"px "+bigy+"px"});
楼主可以看看原生的js是怎么实现的
比如
document.getElementById("xxxx").style.backgroudPosition
document.getElementById("xxxx").style.backgroudPosition="10px 20px"
document.getElementById("xxxx").style.cssText
document.getElementById("xxxx").style.cssText="color:red;background:black;"

【热门文章】
【热门文章】