ya logre traer las img

This commit is contained in:
hugo cabrera diaz
2018-10-23 12:44:35 -05:00
parent cbcc3a5567
commit 43bb5fa9c8
2 changed files with 15 additions and 3 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ div .carrusel{
}
.imag{
width: 90%;
width: 100%;
height: 300px!important;
margin: auto;
}
+13 -1
View File
@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../css/bootstrap.min.css">
<!-- <link rel="stylesheet" href="../../css/bulma.css"> -->
<link rel="stylesheet" type="text/css" href="slick/slick.css"/>
<link rel="stylesheet" type="text/css" href="slick/slick-theme.css"/>
<link rel="stylesheet" href="css/estiloh.css">
@@ -22,6 +23,7 @@
<div><img class="imag" src="imag/imagen03.jpg" alt=""></div>
<div><img class="imag" src="imag/imagen04.jpg" alt=""></div>
<div id="imgh">
</div>
</div>
</div>
@@ -45,8 +47,18 @@
for (var i = 0; i < res.length; i++)
{
console.log(res[i].url);
console.log(res[i].id);
const app = document.getElementById('imgh');
const logo = document.createElement('img');
logo.src = (res[i].url);
// const imgh = document.createElement('div');
imgh.setAttribute('class', 'imag');
// imgh.setAttribute('class', 'imag');
// imgh.setAttribute("width", "100%");
// imgh.setAttribute("height", "300px");
app.appendChild(logo);
// app.appendChild(imgh);
}
</script>
<script type="text/javascript">
$(document).ready(function(){