vendredi 4 octobre 2019

How to load random pictures with their actual size

im trying to learn css/html maybe a little bit of js. I got an idea that Ill try to make a bullshit website, its only purpose is to load random shit images.So I got my pictures downloaded, somehow I made it work(mostly copy paste), but I got one problem.When the images are loaded they lose their original size, and i have to "give" a size for them.(sorry for my shitty english tho).The problem is that I got like 5OO+ pictures so I cant give every pictures width and height(I mean I can but Im sure there is an easier way to do it).So I want to load the random pictures without giving them a height and a width,I want to load them as they are saved, their "natural" size.And If its possible I would like that when somebody opens the webpage in the box (where the random pictures will appear) they will see a "fix" picture.I mean every time somebody opens the page this "fix" pictures loads first(a picture saying welcome or something), without hitting the "random picture" button.Ill link my "work".Thank you for helping and sorry once again for my bullshit english. my shitty work




Aucun commentaire:

Enregistrer un commentaire