问题
I wanted to know if it's possible to insert a video mp4 file in the parallax effect instead of an image? I tried a few different codes but all won't work. Any ideas?
I tried to recreate the parallax effect in a snippet for you to take a look if it's possible to insert a video file there or not.
.parallax-window {
min-height: 42vw;
margin-bottom: -42vw;
background: transparent;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" type="text/javascript"></script>
<script src="https://u.jimcdn.com/cms/o/s83f47c4a38d26e7e/userlayout/js/parallax.js?t=1583292164"></script>
<div class="parallax-window" data-parallax="scroll" data-z-index="1" data-image-src="https://images.ifun.de/wp-content/uploads/2020/01/mac-wallpaper-mashup.jpg">
</div>
来源:https://stackoverflow.com/questions/62314791/parallax-video-background-instead-of-image