mi js
var imgs = document.getElementById("galeria");
function mostrarImagenDeFirebase() {
imagenesFbRef.on("value", function (snapshot) {
var datos = snapshot.val();
var result = "";
result += '<div class="owl-carousel owl-theme">';
for (var key in datos) {
var images = datos[key].url;
result += '<img class="owl-lazy" height="500" data-src="'+images+'" alt="">';
console.log(images);
}
result += ' </div>';
imgs.innerHTML += result;
});
}
<div class="row"id="galeria">
</div>
不显示页面,图像仅离开空白但不显示
答案 0 :(得分:1)
尝试将data-src=
替换为src=
,也请关闭图像标签-<img ... />