jQuery 动态设置背景图片:使用 data 属性和 CSS
To set the background-image CSS property for the element with class "myclass" to the value of the data_bg attribute, you can use the following code: \n\n$('.myclass').css('background-image', 'url(' + data_bg + ')');
原文地址: https://www.cveoy.top/t/topic/mSlx 著作权归作者所有。请勿转载和采集!