扫码关注官方订阅号
前面js部分body部分不好意思,不知道为什么不能复制代码,只能发图片了
闭关修行中......
改为
#tu { background-image: url("./images/xxxxxxxxxxxx.jpg"); } #tu 有没有宽高?
试一试
将 tu.style.backgroundImage 改成 tu.style.background 试试。
tu.style.backgroundImage
tu.style.background
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
改为
试一试
将
tu.style.backgroundImage改成tu.style.background试试。