Click here to Skip to main content
15,903,385 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello....

I have to display 5 scrolling images along with text.

Does anyone know how to do this?

What I have tried:

i used style,

* {
margin: 0;
padding: 0;
border: 0;
}

/* relevant styles */
.img__wrap {
position: relative;
height: 500px;
width: 1000px;
}

.img__description {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;

color: #000;
visibility: hidden;
opacity: 0;
font-size:40px;

/* transition effect. not necessary */
transition: opacity .2s, visibility .2s;
}

.img__wrap:hover .img__description {
visibility: visible;
opacity: 1;
}

and
html code as
<div class="img__wrap">
  <img class="img__img" src="img1/itint.jpg" />
  <p class="img__description">This image looks super neat.</p>
</div>
Posted
Updated 5-Jul-17 20:31pm

1 solution

This code displays your 5 images and text on it.what probelem are you facing exaclty kindly explain

HTML
<div class="img__wrap">
  <img class="img__img" src="img1/itint.jpg" />
  <p class="img__description">This image looks super neat.</p>
</div><div class="img__wrap">
  <img class="img__img" src="img1/itint.jpg" />
  <p class="img__description">This image looks super neat.</p>
</div>
<div class="img__wrap">
  <img class="img__img" src="img1/itint.jpg" />
  <p class="img__description">This image looks super neat.</p>
</div><div class="img__wrap">
  <img class="img__img" src="img1/itint.jpg" />
  <p class="img__description">This image looks super neat.</p>
</div>
 
Share this answer
 
v2
Comments
Member 12938297 6-Jul-17 4:06am    
i can able to scroll images...
but text is not displaying on image...above code is working for fixed image.......
plz...tell me how to do this in case of scrolling image...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900