Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 74268

Images changing when I refresh page

$
0
0

I'm making a website for a friend that produces digital art. This person wants to have images scrolling across the screen like a marquee but with images, however, I'm running into an annoying error. Everytime I refresh the page, the images change. Sometimes its how It's how I want it to be but sometimes it's wrong.

These are the images that im talking about:

The incorrect one enter image description here

The correct one enter image description here

You can see for yourself on my website: https://www.kevs.website/art/

This is the HTML code:

<div class="preve">
    <img src="images/image0.jpg" class="preveimg">
    <img src="images/image1.jpg" class="preveimg">
    <img src="images/image2.jpg" class="preveimg">
    <img src="images/image3.jpg" class="preveimg">
    <img src="images/image0.jpg" class="preveimg">
    <img src="images/image1.jpg" class="preveimg">
    <img src="images/image2.jpg" class="preveimg">
    <img src="images/image3.jpg" class="preveimg">
</div>

This is the CSS code:

.preveimg {
height: 493.150685px;
width: 500px;
animation: sc-left 20s linear infinite;
background-repeat: no-repeat;
background-size: cover;

}

.preve {
display: flex;

}

Code may be amateur because I only started a while ago.

This only occurs when I host it on a website. When I open it from the file explorer everything works fine which confuses me because should'nt they be the same?


Viewing all articles
Browse latest Browse all 74268

Trending Articles