简体   繁体   English

我有四个div,每个div包含2张图片。 我想随着每个div更改这些图片,但不要一次

[英]I had Four divs contains 2 images in each div. I want to alter those Images withing each div, BUT NOT AT ONCE

Each div contains Two images. 每个div包含两个图像。 How it works explained below... 运作方式说明如下...

-div1:ImagesA.1 fade out , ImageB.1 fadeIn.
-Time Interval of 2secs.
-div2: ImageA.2 fadeOut, ImageB.2 FadeIn.
-Time Interval of 2 secs.
-div3: ImageA.3 fadeOut, ImageB.3 FadeIn.
-Time interval of 2 secs.
-div4: ImageA.4 fadeout. ImageB.4 FadeIn.

again..
-div1:ImageA.1 fadeout and ....
cycle countinous forever.

As per my understanding you are trying to fadeIn and fadeOut 2 images within a div at a regular time interval. 根据我的理解,您正在尝试按fadeIn时间间隔在div中fadeInfadeOut 2张图像。

For regular time interval, you can use Javascript's setInterval 对于常规时间间隔,可以使用Javascript的setInterval

I have created a JSFiddle for a single div using JQuery , hope this gives you an idea. 我已经使用JQuery为单个div创建了一个JSFiddle,希望这能给您一个想法。

JSFIDDLE JSFIDDLE

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我想一次更改 2 个图像 - I want to change 2 images at once 使用jQuery each()将图片动态添加到div中。以某种方式,它们都添加到了最后一个div中 - Adding images dynamically to divs using an jQuery each() .. somehow they are all adding to the last div 我想将图像放入 <div> 代替图像数组 - I want to put my images in a <div> instead of an image array 我有3个div,每个div都有自己的主题,现在我希望每个div打开其模式 - I have 3 divs each with it's own topic, and now I would like for each div to open its modal 我希望相同 class 的每个 div 来选择他们的孩子 - I want each div of the same class to choose their children 使用AJAX隐藏div。 我无法在多个div上使用 - Using AJAX to hide a div. I can't get it to work on multiple divs Javascript:querySelector 只选择 1 个 div。 如何将其发送到 select 所有具有相同 class 的 div? - Javascript: querySelector only selects 1 div. How do I get it to select all divs with the same class? 我想将div中包含的图像居中。 当我将50%的保证金设置为最高时,它从div中流出。 我如何包含它? - I want to center my image contained in a div. When i set 50% margin-top, it is flowing out of the div. How do i contain it? 如何将切换功能应用于包含多个图像的 div 中的 div onclick 中的一个图像? - How would I apply a toggle function to one image in a div onclick in a div that contains multiple images? 将鼠标悬停在网页顶部的图像上后,我要指定div并根据图像悬停隐藏其他div - After hovering on images at the top of a webpage I want to specific div and hide other div based on the image hover
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM