如何在 jQuery .css() 中使用多个背景的堆叠顺序

How to use Stacking Order of Multiple Backgrounds with jQuery .css()

如何在 jQuery

中使用 css() 定位多个背景 属性

示例:

    body {    
       background: 
          url("img1.png"),
          url("img2.png"),
          url("img3.png");
    }

您可以像使用任何其他样式属性一样使用 css 方法。

$('body').css('background-image', 
   'url("https://www.w3schools.com/css/img_flwr.gif"),'
   + 'url("https://www.w3schools.com/css/paper.gif")'
);