html设置div背景图片的方法:1、使用div元素的style属性,语法为“<div style="background:url(图片名称);">”;2、给div元素添加“{background-image