jquery更换css背景

更换背景用jquery找到对象,改变它的css的背景图片地址即可:

$( "对象" ).css( "background" ,"url(新背景图片地址)");

例如:

$(".container").css("background","url(image/index.png)");

  

posted @ 2018-10-18 10:01  包子酱呐  阅读(2783)  评论(0编辑  收藏  举报