How to make HTML/CSS slideshow background fade?

后端 未结 2 2018
被撕碎了的回忆
被撕碎了的回忆 2021-01-12 22:09

I was wondering how you make a background slideshow fade into other photos like a regular slideshow. I\'ve tried many codes and have yet to be successful.

Now, I hav

2条回答
  •  时光说笑
    2021-01-12 22:34

    Working example on jsFiddle.

    Use this code instead: (note that you'll need to load jQuery in order for this code to work)

    HTML

    CSS

    .fadein {
        position:relative;
        height:320px;
        width:320px;
    }
    
    .fadein img {
        position:absolute;
        left:0;
        top:0;
    }
    

    JavaScript

    
    
    

提交回复
热议问题