Landing Page With Smooth Scroll - 3 Options

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.ย. 2024
  • In this video we will create a simple landing page with smooth scrolling. I will show you 3 options including pure CSS (scroll-behavior), jQuery and a lightweight JS script.
    Sponsor: Freelancer Bundle (Use "brad25" for 25% off)
    studywebdevelo...
    Code:
    codepen.io/bra...
    Smoothscroll Script:
    github.com/cfe...
    💖 Become a Patron: Show support & get perks!
    / traversymedia
    Website & Udemy Courses
    www.traversymed...
    Follow Traversy Media:
    / traversymedia
    / traversymedia
    / traversymedia

ความคิดเห็น • 266

  • @TraversyMedia
    @TraversyMedia  5 ปีที่แล้ว +83

    Hope you like the video :) If anyone has any other methods they use to get this effect, please leave a comment...Have a great weekend!

    • @akib_khan
      @akib_khan 5 ปีที่แล้ว +1

      I was looking for this for a while but there were no good examples. Thanks a lot sir.

    • @franciscohanna2956
      @franciscohanna2956 5 ปีที่แล้ว +1

      I'm using the CSS property "scroll-behavior: smooth;". It is not as widely supported as I would like, but I assume that it will sometime.

    • @amandamate9117
      @amandamate9117 5 ปีที่แล้ว +1

      @@galihindra5901 you want him to be your "daddy" right?

    • @eric7758
      @eric7758 5 ปีที่แล้ว

      Traversy can you please do a video on how to create an embeddedable widget with react js for other website to use??

    • @hyfytale9577
      @hyfytale9577 5 ปีที่แล้ว

      Thanks for this tutorial! How would you write it in vanilla JavaScript instead of using JQuery? :O

  • @likeashitremixit
    @likeashitremixit 3 ปีที่แล้ว +59

    13:20 implement scroll effect with CSS
    15:38 implement scroll effect with Jquery
    19:50 implement scroll effect with smooth scroll

  • @clumsycoco
    @clumsycoco 5 ปีที่แล้ว +85

    Hard to keep up with the amount of good content this man puts out. Jeez.

  • @GIBunz
    @GIBunz 5 ปีที่แล้ว +76

    Holy crap, you do in 20 minutes what 3 books couldn't tell me.

    • @kwii22789
      @kwii22789 5 ปีที่แล้ว +7

      this is not the career for you guys

    • @Wahid0172
      @Wahid0172 5 ปีที่แล้ว +9

      It took you 3 books to scroll?

    • @elilumilay9405
      @elilumilay9405 4 ปีที่แล้ว +8

      @@kwii22789 dude that is rude. You are watching Brad Traversy and yet you don't know that he hates people like you

    • @elilumilay9405
      @elilumilay9405 4 ปีที่แล้ว

      @Badimo dude you must watch videos of Brad saying he hates negative person and he stays away from them as much as possible. You got my point dude?

    • @chanakyakhatri5194
      @chanakyakhatri5194 4 ปีที่แล้ว

      you can look w3school instead, and it has same code

  • @itcpatrikt
    @itcpatrikt 4 ปีที่แล้ว +2

    University gets me a degree, Brad gives me the knowledge! This channel is the best!

  • @mashudparvez8035
    @mashudparvez8035 3 ปีที่แล้ว

    This video made my day. Such a nice video. I spend my whole day for searching this types of video and thank God, finally I get it and fulfill my speciation. Thank you so much for nice describing. Take love from Bangladesh.

  • @kimmiea3321
    @kimmiea3321 ปีที่แล้ว

    I think you just saved my sanity while creating my bootcamp project! Trying to go from zero to proficient in code the past 6 weeks has been stressful. So Thank you!

  • @keyos27
    @keyos27 5 ปีที่แล้ว

    What is best and consistent about your videois that you always start from scratch. I cannot express how much I appreciate it.

  • @nadir2k
    @nadir2k 5 ปีที่แล้ว +1

    I paused the video, titled my Page as "Smooth Scroll Landing Page", played the video and Brad did the same. Watching brad for a year now, our minds now work similar to brad's standards. LOL.

  • @amandahitomi2033
    @amandahitomi2033 4 ปีที่แล้ว +2

    This is awesome man. Congrats. Wish more professors were like you.

  • @guylemay1471
    @guylemay1471 5 ปีที่แล้ว +3

    Couldn't get the javascript working, so I am gonna stick with CSS.
    Thanks for this nice and easy tutorial.

  • @igoroliveira9146
    @igoroliveira9146 4 ปีที่แล้ว

    I got mine working with jQuery, awesome cross platform. Took a while to find somebody that taught it.

  • @tiaeastwood8416
    @tiaeastwood8416 4 ปีที่แล้ว

    Whenever I am looking for something code-related, you always have the answer!

  • @namwone
    @namwone 3 ปีที่แล้ว

    Amazing. I'm. Trying to make my personal site and the resources I've found on this channel have been exceedingly useful. Wow.

  • @LEEROYY182
    @LEEROYY182 5 ปีที่แล้ว

    You really are one of the best in the game man, I'm currently studying a degree in internet design and it has nothing on what you put out. Appreciate the content!

  • @nonsolovita
    @nonsolovita 5 ปีที่แล้ว

    i really appreciate front end content in this channel ,please give more and keep going ,good job

  • @prime_tech7555
    @prime_tech7555 2 ปีที่แล้ว +1

    You know what sir, you are wow in explaining!

  • @dany3370
    @dany3370 5 ปีที่แล้ว +1

    If you need to make active links on scroll, instead of using window.scrollY you have to use document.querySelector(‘.container’).scrollTop

    • @tribiec
      @tribiec 5 ปีที่แล้ว

      thanks a lot dude!!!

  • @anubislockward3750
    @anubislockward3750 5 ปีที่แล้ว

    This looks amazing! I have just been into web dev for like three months now. This was easy to understand and was something that I wanted to implement, gonna try it out. Thanks a lot.

  • @Bayo106
    @Bayo106 5 ปีที่แล้ว

    Brad I'm so glad you did this, the z-index: 1 is what i have been looking for, for a week lol. THANK YOU for the small details

  • @ShreadsEBS
    @ShreadsEBS 3 ปีที่แล้ว

    This was fun! I was able to successfully get option 2 & 3 working. I had issues with Option 1. I’m sure I messed up my code some where along the way. Thanks again for the great videos!

  • @maximbazant5058
    @maximbazant5058 2 ปีที่แล้ว +1

    Such a great video! Thank you so much for making this. Simple, straight to the point, great explaining!

  • @muthuhari8875
    @muthuhari8875 5 ปีที่แล้ว +18

    Hi Brad, please do some videos like microservices.

  • @aspeno5613
    @aspeno5613 2 ปีที่แล้ว

    This is amazing, thank you! Been driving me nuts for days

  • @xYewtubeAccountx
    @xYewtubeAccountx 5 ปีที่แล้ว +1

    Cool! I didn't know you could smooth scroll with CSS. Hope it catches on with other browsers.

  • @starterdev
    @starterdev 4 ปีที่แล้ว

    I really love your videos like this one, everything is made from scratch and explained well.
    Your tutorials are easy to learn than other youtubers.

  • @jerryleemelton1860
    @jerryleemelton1860 2 ปีที่แล้ว

    This was great! The last method worked like a charm in my site. Thanks!

  • @SonoKabe
    @SonoKabe 5 ปีที่แล้ว +2

    Amazing as usual. Of course always easy to follow as well ! Thanks Brad !

  • @talhasiddiqui4780
    @talhasiddiqui4780 3 ปีที่แล้ว

    Thanks for giving us the code in description I appreciate that 😊

  • @Paracopa
    @Paracopa 5 ปีที่แล้ว +1

    This man is pure awesomeness. I'm getting so excited everytime the notification hits

  • @emirhadzimehmedovic7183
    @emirhadzimehmedovic7183 5 ปีที่แล้ว

    Typical Brad like always, straight to the point !!! Good Job !!!

  • @wibowomuhmmad
    @wibowomuhmmad 4 ปีที่แล้ว +1

    Thanks bro, now i can add smooth scrool to my project 🙏

  • @nobodyxyz7651
    @nobodyxyz7651 3 ปีที่แล้ว

    love you man, that tutorial is 10/10

  • @almostworthy2973
    @almostworthy2973 4 ปีที่แล้ว

    thanks for the video man!! Just a minor correction .navbar{
    width: 99%;
    }
    to avoid it overflowing on the scroll bar!

  • @ashotmuradyan4386
    @ashotmuradyan4386 4 ปีที่แล้ว

    I did it for my page only in 5mins)).Thank you broo, respect

  • @shahrketab9803
    @shahrketab9803 5 ปีที่แล้ว

    Downloaded all your videos from this Playlist 🙂. Thanks Brad❤️

  • @KiaanCastillo
    @KiaanCastillo 5 ปีที่แล้ว +2

    Thanks for this video, Brad! Top quality as always :)

  • @guinerb7753
    @guinerb7753 5 ปีที่แล้ว

    CSS surprising me everyday. Cool tutorial, Brad!

  • @gagiknavasatariyan7316
    @gagiknavasatariyan7316 4 ปีที่แล้ว

    Thanks Brad it was very helpful for me. I wish you the best.

  • @Matin1999_unique
    @Matin1999_unique 3 ปีที่แล้ว

    thank you very much. i found it finally.

  • @NabhoneelMajumdar
    @NabhoneelMajumdar 5 ปีที่แล้ว

    Needed this for SO LONG. THANK YOU AGAIN, BRAD

  • @abrar8133
    @abrar8133 3 ปีที่แล้ว

    THANK YOU FOR MAKING IT SO SIMPLE!

  • @noone-gr4is
    @noone-gr4is 4 ปีที่แล้ว

    Nicely Explained! I subbed!

  • @albertkovtoun662
    @albertkovtoun662 3 ปีที่แล้ว

    Thanks for the tutorial. Helped me a lot

  • @TheLollercaster
    @TheLollercaster 4 ปีที่แล้ว

    first option is the way to go! thank you!

  • @bodeokunfolami9501
    @bodeokunfolami9501 5 ปีที่แล้ว

    i have waited for this for along time, thanks Traversy Media

  • @jabiribnmuzammel3978
    @jabiribnmuzammel3978 5 ปีที่แล้ว

    It's tooooooo easy to understand you ....
    Your explanation method is awesome...
    for the video.

  • @BudiSantoso-er6cq
    @BudiSantoso-er6cq 4 ปีที่แล้ว

    Amazing.. btw, your voice signifies wise man.. thanks very much

  • @aleksandrpokusaev9175
    @aleksandrpokusaev9175 4 ปีที่แล้ว

    hey man i love your videos. I am creating my portfolio just like John Doe. Keep it going

  • @wasiquehaider4727
    @wasiquehaider4727 5 ปีที่แล้ว +13

    Brad please do a video on user registration with image upload please please please using node , express and mongoose

    • @TraversyMedia
      @TraversyMedia  5 ปีที่แล้ว +16

      Will see what I can do

    • @aminelouni
      @aminelouni 5 ปีที่แล้ว +1

      thank you we are waiting

    • @tkdevlop
      @tkdevlop 5 ปีที่แล้ว +4

      Take this hint and try to do it on your own "multer" because the best way to learn is to try yourself ;)

    • @paweszybaj904
      @paweszybaj904 5 ปีที่แล้ว +1

      You can use express with multer to upload image

    • @lewis6590
      @lewis6590 5 ปีที่แล้ว +2

      imagine begging for a tutorial instead of just googling the problem... LOL

  • @nellison
    @nellison 5 ปีที่แล้ว

    I always check my notification just for you Brad!! Great job keep 'em coming

  • @stergiosk6064
    @stergiosk6064 5 ปีที่แล้ว

    I love your front end development videos

  • @hassantariq8847
    @hassantariq8847 5 ปีที่แล้ว +5

    Awesome

  • @kadekeqw23
    @kadekeqw23 5 ปีที่แล้ว

    This is unique and exciting. Thanks Brad!

  • @brucekoehler1154
    @brucekoehler1154 5 ปีที่แล้ว

    Good morning Brad. Just watched this video and I enjoyed it. I was wondering if it would be possible for you to do a follow up for horizontal scrolling of the pages.

  • @jtoomay9102
    @jtoomay9102 3 ปีที่แล้ว

    Bro you are a life saver. +1 sub

  • @gargameo4560
    @gargameo4560 5 ปีที่แล้ว

    Wow, this is a great video. Cool new CSS features.

  • @frikishaan
    @frikishaan 5 ปีที่แล้ว +3

    Great content as always loved it! ❤
    What is the definition of passion for you?

  • @oakleyorbit
    @oakleyorbit 5 ปีที่แล้ว

    Hey Brad I know you get a ton of requests! So I’m just gonna put one out there among the many, I would love to see React with D3 and maybe Redux if you could. Otherwise many thanks for all your help we really appreciate it!

  • @feminist098
    @feminist098 5 ปีที่แล้ว

    Sir, thank you so much. This is so helpful and practical.

  • @girlandhercomputer7204
    @girlandhercomputer7204 4 ปีที่แล้ว +1

    I like the sentence you said: I want you to learn something else~ one more sub

  • @DesignMedium
    @DesignMedium 5 ปีที่แล้ว

    Neat! You're such an inspiration. Thank you.

  • @nocturno7887
    @nocturno7887 3 ปีที่แล้ว

    Thank you Brad

  • @josephsena9154
    @josephsena9154 4 ปีที่แล้ว

    Thanks Brad!

  • @abhishek_k7
    @abhishek_k7 5 ปีที่แล้ว +1

    Those background images were pretty dope. Are they free? If yes, can you provide a link if possible? Video was great as always btw. Thank you!

  • @pitisradu
    @pitisradu 5 ปีที่แล้ว +2

    Thanks for the video, Brad. But with these types of Landing Pages, I always had one problem. How can I create an underline effect in the navbar on the current section where the user is looking? For instance if the section he was looking was "About", in the navbar I would see an underline on About, even when he is scrolling. I'd appreciate a comment since I've been looking for a solution to this, but couldn't find.

    • @lexsemenenko
      @lexsemenenko 5 ปีที่แล้ว +2

      Pitis Radu I would use a library called Waypoints. When u hit a section (scrollpoint), it would add an active class to the menu item. It’s in addition to this tutorial.

    • @Elezthee
      @Elezthee 5 ปีที่แล้ว +1

      You can do that with plain JavaScript, example with explanation here: codepen.io/dbilanoski/pen/LabpzG, just adjust CSS to get underline effect. Like the commenter before me said, idea is to dynamically add active class to current menu item while scrolling so it can change style (get highlighted).

    • @pitisradu
      @pitisradu 5 ปีที่แล้ว +1

      @@lexsemenenko Thank you very much, you are a life saver, I've been searching for this for months :)

  • @eloquentjs1829
    @eloquentjs1829 3 ปีที่แล้ว

    Thank you so much, Brad!!

  • @ricklove6753
    @ricklove6753 5 ปีที่แล้ว

    As usual.....awesome. Thank you again.

  • @MenAtWorkMedia22
    @MenAtWorkMedia22 5 ปีที่แล้ว +1

    You are the man, Brad!

  • @jahongirabdullayev8303
    @jahongirabdullayev8303 4 ปีที่แล้ว

    Brialliant tutorial, great thanks !!!

  • @danielorosz8493
    @danielorosz8493 5 ปีที่แล้ว

    Thank you Sir! Great stuff as always!

  • @sorbangsorrysorrybangbang7388
    @sorbangsorrysorrybangbang7388 3 ปีที่แล้ว

    Thank you so much ❤️

  • @naveenbattula
    @naveenbattula 5 ปีที่แล้ว +1

    Hey Brad can you do a course on Django and react , oh wait you already did it thanks ♥️

  • @damianrivas
    @damianrivas 5 ปีที่แล้ว +2

    Amazing tutorial! Well done as always, Brad.
    Can someone explain why the background images show up in Chrome, but not when I run the app in Firefox? I'm trying to learn more about the front-end but ugh this is why I'm a backend guy.

  • @danpetre5414
    @danpetre5414 4 ปีที่แล้ว

    Wow, I'm learning so much. Greetings and Thanks :)

  • @dancehalllyrics1303
    @dancehalllyrics1303 5 ปีที่แล้ว

    I think it was me who told you about the scroll-behavior in CSS in the comment sections in your HTML & CSS Udemy course. Glad to see you use it!
    Then a question, I want to ask you:
    If we look away from the browsers that only support some of the behaviors, which one will you say is the best? The light script one, the jQuery one or the pure CSS one?

    • @TraversyMedia
      @TraversyMedia  5 ปีที่แล้ว +1

      I remember :) If we are not taking browser compatibility into question, my opinion is using pure CSS.

    • @dancehalllyrics1303
      @dancehalllyrics1303 5 ปีที่แล้ว

      Traversy, alright! Thanks! Then another thing:
      Everytime I have tried to get e.g. Sass up and running in my text editor (VS Code) by following your guides down to the smallest detail, it hasn’t worked. Not even a single time. Can you help me personally getting it up and running?
      Thanks in advance!

  • @FernandoMartinez-dn4se
    @FernandoMartinez-dn4se 5 ปีที่แล้ว

    all your site designs are nice! do you design it first and then code it out? or are you just designing as you go?

  • @boultifnidhal2600
    @boultifnidhal2600 4 ปีที่แล้ว

    dude thank you so much that is so helpful ♥

  • @delwarmia9393
    @delwarmia9393 8 หลายเดือนก่อน

    Very like Sir tocking voice thanks support

  • @hassenmezghani5279
    @hassenmezghani5279 5 ปีที่แล้ว

    You're awesome man! Can you do a flutter crash course?

  • @dudeecodes
    @dudeecodes 5 ปีที่แล้ว

    Thanks!!! For giving code..
    Excellent work ✔️👦

  • @swinginonthespiral8765
    @swinginonthespiral8765 2 ปีที่แล้ว

    Awesome. Thank you! Would it be possible to bind arrow keys too using CSS? I like the snap functionality, but I only know how to pick up keyboard input using JS/jQuery.

  • @FinanceWisdomTech
    @FinanceWisdomTech 5 ปีที่แล้ว

    Learned something new .

  • @AwaisButt-gr9lw
    @AwaisButt-gr9lw 5 ปีที่แล้ว

    Really helpful, thanks man 👍

  • @shreyasbalachandran2576
    @shreyasbalachandran2576 5 ปีที่แล้ว

    Thank you Brad for the vid!

  • @malikd.mcnish6482
    @malikd.mcnish6482 ปีที่แล้ว

    Love your content

  • @JohnDoe-rj9oy
    @JohnDoe-rj9oy 2 ปีที่แล้ว

    Thanks a lot!!

  • @austinjohn3156
    @austinjohn3156 5 ปีที่แล้ว

    Good day boss. I have been watching you tutorial for some days now and i must say, you are so fucking amazing, you are modern and up to date. Nice work. I have a request though. Please can you make a video on how this theme was made, that would be very helpful and nice. Thank you. Preview

  • @Simon-fu6cp
    @Simon-fu6cp 2 ปีที่แล้ว

    Thanks king

  • @aadiprem
    @aadiprem 2 ปีที่แล้ว

    Great video.

  • @dura3221
    @dura3221 5 ปีที่แล้ว +2

    Hi Brad, can you do something on test driven development using javascript

  • @MiserableDuck95
    @MiserableDuck95 5 ปีที่แล้ว

    As always, you're the best.

  • @SuperKing11100
    @SuperKing11100 5 ปีที่แล้ว

    Hey Brad this is a great video, the scroll snap feature is really convenient to use for my site! However for some reason when I linked the script for options 2 & 3 as well as the main.js it doesn't work for Safari :/

  • @sc2140
    @sc2140 3 ปีที่แล้ว

    great video!

  • @NeoCoding
    @NeoCoding 5 ปีที่แล้ว

    great job! unfortunately, I wasn't able to force js option work.

  • @hashimkhan1889
    @hashimkhan1889 5 ปีที่แล้ว

    amaziiiiiiiiiiiiiiiing Sir nice very nice

  • @ssfnathotmail
    @ssfnathotmail 5 ปีที่แล้ว

    an UnrealC++ tutorial bradstyle would be amazing. not sure if the market is big enough

  • @gabrielsales7402
    @gabrielsales7402 4 ปีที่แล้ว

    thank you

  • @priyanzhu
    @priyanzhu 2 ปีที่แล้ว

    Plz make a video on locomotive scroll effect

  • @yusuffajarulloh4671
    @yusuffajarulloh4671 5 ปีที่แล้ว

    Nice!!! Thanks Brad