Can't make it work. I need to put some images on page and then put some default image on every image that I've put before. Here I put some images on page:
tmp = 0;
for(var a = 1; a <= get_height; a++){
for(var b = 1; b <= get_width; b++){
document.write("<img src=" + shuffled_mass[tmp] + "class='image'>");
tmp++;
}
document.write('\n');
}
It works fine. But I can't put default image on top of those. Tried to do it with css:
.image {
position:relative;
z-index: 1;
}
.image:after {
z-index: 3;
background-image: url('/static/test_app/image/default.png');
height:96px;
width:96px;
display:block;
content: ' ';
position:absolute;
left:0;
top:0;
}
But that didn't work. Could someone, please, help me with this?