javascript scrolling presentation html css

Want to create a scrolling presentation on the webpage using JavaScript, HTML, and CSS? Solution: JavaScript Scrolling Presentation HTML CSS. In other words, Image Change On Scroll with text Animation.

When we have to show different types of things on one webpage, then we create a presentation type design. Basically, this design is with only text and images, but the effect creates this like a presentation. Previously I have shared Animated Scroll Images program, first check that out.

Today you will learn to create an image scrolling presentation effect using Jquery. As you know jquery is JavaScript library, That’s why I am put this on JS category. Basically, this program has multiple sections, each section has own text and image. When we start scrolling then another text block comes with a different photo.

So, Today I am sharing JavaScript Scrolling Presentation with HTML and CSS. In this program, Image will change on scroll up or down according to their text. I have used the jQuery library to create it easily, we all know libraries are made for easy work. Jquery changing the image when another text block appears.

If you are thinking now how this scrolling presentation program actually is, then see the preview given below.

Preview Of Image Change On Scroll

See this video preview to getting an idea of how the program looks like.

Now you can see this visually. If you like this, then get the source code of its.

You May Also Like:

JavaScript Scrolling Presentation HTML CSS Source Code

Before sharing source code, let’s talk about it. As you can see in the preview there are 4 images and text block available. I have used HTML <section> tag for each section which has text and image. Inside the section, I have placed text in the div with text-block class name, & placed the image in a div with img-block class name.

I also have used many other kinds of divs, you can see in the code. With CSS I have placed text and images on their right position. This is also responsive, I put the image width 200px only, But its become bigger on larger screens. For creating the size effect, I have used the CSS @media query. I have put 2 conditions, the image will become 500px on devices which are wider than 700px. And it will become 700px when devices have more than 1000px width.

Now jQuery handles the image changing function. First, I have created variables for getting the sections, then used JavaScript if statement to put the image on their text-block. Now image change with little animation, for this I have used CSS @keyframe property (info). There are more basic things, I can’t explain all in writing.

For creating this program you have to create 3 files. First for HTML, second for CSS, and third for JavaScript. Follow the steps to creating this without any error.

index.html

Create an HTML file named ‘index.html‘ and put these codes given here below.

style.css

Now create a CSS file named ‘style.css‘ and put these codes given here.

function.js

The final step, Create a JavaScript file named ‘function.js‘ and put the codes.

That’s It. Now you have successfully created JavaScript Scrolling Presentation HTML CSS, Image Change On Scroll. If you have any doubt or question comment down below.

Thanks For Visiting, Keep Visiting.

6 COMMENTS

  1. hi shaan, thanks for creating this. i just tried it now. iam new to vs code. i just all pages, i mean index.html , style.css and function.js. …so now if iam opening it iam getting just index page, iam getting just information , those are not scrolling. how can i combine all pages, can u please explain it.

  2. Thank you for sharing these codes! I am very new to coding (literally 2 days old) and am trying to code a basic website. I was wondering how to add a header for the title of the webpage without moving the elements. I successfully added a header but the whole thing moved. The image is basically sitting on the bottom of the page now instead of floating. I hope I’m making sense.

LEAVE A REPLY

Please enter your comment!
Please enter your name here