By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
463,055 Members | 554 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 463,055 IT Pros & Developers. It's quick & easy.

How do I use html to have scrolling images

P: 1
I have a picture with a white box in the middle. The white box in the middle is where I would like the 5 images to continuously scroll/manually scroll between. Please can you help. Is this maybe a jquery task?
Nov 26 '13 #1
Share this Question
Share on Google+
3 Replies

Exequiel
100+
P: 288
Yes it is a jquery task,, you can search in google for scrollable images. .
Nov 27 '13 #2

P: 49
Try This Code

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <meta name="viewport" content="width=device-width, initial-scale=1">
  4. <style>
  5. body, html {
  6.   height: 100%;
  7.   margin: 0;
  8.   font-family: Arial, Helvetica, sans-serif;
  9. }
  10.  
  11. * {
  12.   box-sizing: border-box;
  13. }
  14.  
  15. .bg-image {
  16.   /* Full height */
  17.   height: 50%; 
  18.  
  19.   /* Center and scale the image nicely */
  20.   background-position: center;
  21.   background-repeat: no-repeat;
  22.   background-size: cover;
  23. }
  24.  
  25. /* Images used */
  26. .img1 { background-image: url("img_snow.jpg"); }
  27. .img2 { background-image: url("img_girl.jpg"); }
  28. .img3 { background-image: url("img_lights.jpg"); }
  29. .img4 { background-image: url("img_nature.jpg"); }
  30. .img5 { background-image: url("img_forest.jpg"); }
  31. .img6 { background-image: url("img_woods.jpg"); }
  32.  
  33. /* Position text in the middle of the page/image */
  34. .bg-text {
  35.   background-color: rgb(0,0,0); /* Fallback color */
  36.   background-color: rgba(0,0,0, 0.4); /* Black w/opacity/see-through */
  37.   color: white;
  38.   font-weight: bold;
  39.   font-size: 80px;
  40.   border: 10px solid #f1f1f1;
  41.   position: fixed;
  42.   top: 50%;
  43.   left: 50%;
  44.   transform: translate(-50%, -50%);
  45.   z-index: 2;
  46.   width: 300px;
  47.   padding: 20px;
  48.   text-align: center;
  49. }
  50. </style>
  51. </head>
  52. <body>
  53.  
  54. <div class="bg-image img1"></div>
  55. <div class="bg-image img2"></div>
  56. <div class="bg-image img3"></div>
  57. <div class="bg-image img4"></div>
  58. <div class="bg-image img5"></div>
  59. <div class="bg-image img6"></div>
  60.  
  61. <div class="bg-text">TEXT</div>
  62.  
  63. </body>
  64. </html>
  65.  
1 Week Ago #3

P: 2
es it is a jquery task,, you can search in google for scrollable images. .
1 Week Ago #4

Post your reply

Sign in to post your reply or Sign up for a free account.