This Simple Trick Makes Your Website 83% Better Looking

Поділитися
Вставка
  • Опубліковано 1 січ 2025

КОМЕНТАРІ • 379

  • @rockenOne
    @rockenOne 2 роки тому +145

    This is how CSS should be implemented, clean and standard no dodgy workarounds to get the outcome. Sensational work!

  • @glpg35
    @glpg35 2 роки тому +44

    Finally some parallax that doesn't require background-image, I was looking for this.

  • @gauravkumartripathi5576
    @gauravkumartripathi5576 Рік тому +5

    Finally! a video where every piece of syntax is explained. This is how any development related videos should be!!

  • @legen_dary42
    @legen_dary42 2 роки тому +60

    Wow, I was really overthinking this. You really do simplify things well, sir.

  • @OldManBears
    @OldManBears 2 роки тому +33

    Huge props to you! I totally underestimated CSS's 3d, and never thought that Z Translated elements would have the proper scroll speed of something in the distance. This is SO much better than dicking around with JS and hammering the DOM with scroll listeners. Thank you so much, this is one of your best.

    • @kinstar
      @kinstar 2 роки тому

      haha working with the dom and js 😅 such a nightmare sometimes

  • @pranjalroy6396
    @pranjalroy6396 2 роки тому +233

    I like how you used an underrated property of perspective and used its functionality in such a smart way 😁

    • @خالد-ج4ه8ظ
      @خالد-ج4ه8ظ 2 роки тому +5

      He is genius!

    • @v0xl
      @v0xl 2 роки тому +27

      it's a well-known technique, but he did a great job at explaining it

    • @novanoskillz4151
      @novanoskillz4151 2 роки тому +19

      perspective isn’t underrated at all. its highly used. But his explanation of the distance and scaling multiplier was a real gem.

  • @bernhardsmuts2265
    @bernhardsmuts2265 2 роки тому +60

    I always forget how good you are at explaining things... Well done man!

  • @lmnk
    @lmnk 2 роки тому +106

    🔶IMPORTANT NOTE! 🔶
    As you can see on 9:35, there's a tiny white gap on the very left of the page.
    This is happens because { width: 100%; } with perspective doesn't include the width used for scrollbar, for some reason. In order to fix this issue, simply use { width: 100vw; }, which will set the width to be 100% of the browser window's one.

    • @mikhalpalych
      @mikhalpalych 2 роки тому +1

      xopow

    • @vivekkoul2641
      @vivekkoul2641 2 роки тому

      Hey i got 2 scroll bars do you know what to do?

    • @mikhalpalych
      @mikhalpalych 2 роки тому +5

      @@vivekkoul2641 just delete one lol

    • @vivekkoul2641
      @vivekkoul2641 2 роки тому +1

      @@mikhalpalych i did Lmao

    • @GrowingEggplantion
      @GrowingEggplantion 2 роки тому +1

      @@vivekkoul2641 here you go my code
      body{
      margin: 0;
      }

      section{
      font-size: 2rem;
      padding: 2rem;
      background: #333;
      text-shadow: 0 0 5px black;
      color: white;
      }
      .title{
      font-size: 7rem;
      color: white;
      text-shadow: 0 0 5px black;
      }
      header{
      position: relative;
      height: 100%;
      align-items: center;
      justify-content: center;
      display: flex;
      transform-style: preserve-3d;
      z-index: -1;
      }
      .wrapper{
      height:100vh;
      overflow-y: auto;
      overflow-x: hidden;
      perspective: 10px;
      }
      .background,
      .foreground{
      position:absolute;
      object-fit: cover;
      height: 100vw;
      width: 100vw;
      z-index: -1;
      }
      .background {
      transform: translateZ(-10px) scale(2);
      }
      .foreground {
      transform: translateZ(-5px) scale(1.5);
      }

  • @kedishi
    @kedishi 2 роки тому +2

    Finally, actual parallax scrolling with CSS. All the other video I have seen on this subject have just used a fixed background, which isn't really parallax scrolling. I am definitely going to give this one a try.
    Thanks Kyle

  • @ajaymathesh4285
    @ajaymathesh4285 2 роки тому +3

    From Your Videos I Have mastered my web dev skills....Thank You ..Brother.....

  • @brandonrugzie
    @brandonrugzie 2 роки тому +293

    I tried this, but I only got my site to look 79% better - any recommendations?

    • @compton8301
      @compton8301 2 роки тому +6

      😂😂😂

    • @atina692
      @atina692 2 роки тому +50

      Have you tried turning it off and on again?😂

    • @TheStickofWar
      @TheStickofWar 2 роки тому +12

      I got to 82% by recognising this guy always uses random click bait titles. I don't know what to do for the missing 1%

    • @fullstack_journey
      @fullstack_journey 2 роки тому +14

      stop using comic sans? :P

    • @jeremieneret9940
      @jeremieneret9940 2 роки тому

      🤣

  • @losrobbosful
    @losrobbosful 2 роки тому +1

    Mindblowing. You totally own the title "web dev simplified" with this one. Simplifies my parallaxing efforts extremely. Thanks a lot, Mister Kyle

  • @AmanKumar-qz4jz
    @AmanKumar-qz4jz Рік тому

    i'm from india and i've written same exact code for this exact same code and you have explained amazing......thanks sir

  • @schwetang
    @schwetang 2 роки тому +12

    Good stuff. I didn't know you could use perspective for parallax. I've always made the elements scroll at different speeds. Thanks, Kyle.

  • @legen_dary42
    @legen_dary42 2 роки тому +21

    Love this guy's videos. Explains things really well. Also, I've never seen anyone who looked more like a guitar player in a progressive church band.

    • @cornbone
      @cornbone 2 роки тому +4

      lmao why are you SO right?

    • @XILikeTrainsX
      @XILikeTrainsX 2 роки тому +1

      Oddly specific but true

  • @danberm1755
    @danberm1755 11 місяців тому

    I've been doing CSS for over 20 years. Never knew about the 'perspective' property. Thanks! 😁
    I've done many transforms and scales but never really related it to text scrolling speed. Very cool! Going to give it a try tomorrow. I've been looking into GSAP lately, but am a CSS purist at heart.

  • @tfist
    @tfist 2 роки тому +1

    you're a mind reader! i'm creating a site for my portfolio and was just about to research some vids about parallax effect

  • @puspamadak
    @puspamadak 2 роки тому +4

    Tried this for a long time, but your video explained this in a very easy and simple way.

  • @robwhitaker8534
    @robwhitaker8534 2 роки тому +1

    This is literally on my list of stuff to figure out how to do se we can use it for client sites - thanks!

  • @davejgreen
    @davejgreen Рік тому

    I needed to have the parallax container be a nested descendant of the scrollable container (not an immediate child). I got it to work by putting "transform-style: preserve-3d" on each intermediate element. Great tutorial, as always!

    • @jcq5010
      @jcq5010 10 місяців тому

      do you mind expanding further on this? was it like


      more content here
      and you add transform-style: preserve-3d on each image?

  • @jcpluto4555
    @jcpluto4555 2 роки тому

    Im convinced you're psychic bro. I just got out of a meeting at work and thought i needed this video

  • @JWilliams12117
    @JWilliams12117 2 роки тому +7

    Oh... I was looking for a video that would make it look 84% better.

  • @frankthedsigner558
    @frankthedsigner558 2 роки тому +40

    This is AWESOME! Been trying to figure out how to get this to work without tons of JS code. Super clever how you use perspective and scaling to get that effect. Nice and thanks!

    • @ShawnRitch
      @ShawnRitch 2 роки тому +6

      To do the very same thing it would only take 1 JS function and 5 lines of JS.

    • @ximonx
      @ximonx 2 роки тому +4

      @@ShawnRitch you got a page showing how you did this?

    • @va9if
      @va9if 2 роки тому

      Oh boy, you haven't seen a tons of JS yet :)

  • @ZealanTanner
    @ZealanTanner 2 роки тому

    Holy crap. I’m taking a web dev class right now and your channel is a gold mine for me. Thank you so much!

  • @miniop660
    @miniop660 2 роки тому +11

    Just to mention that wrapping a scroller inside the body and using that as the main scroll might cost some performance, specially on heavy sites. But that was a really smart way to use those CSS properties 🔥

  • @rachelturner9839
    @rachelturner9839 2 роки тому

    thanks for talking so fast and clearly. it was easy for me to focus on. very helpful video!!

  • @guyfromdubai
    @guyfromdubai 2 роки тому +14

    Something I found was my smooth scroll behaviour was broken by this. So after a fiddle I discovered if you add "scroll-behavior: smooth;" to the wrapper instead of putting it on html{} (based on a tutorial I watched) you can get both to function correctly.

  • @danielelgressy
    @danielelgressy 2 роки тому +1

    Cool! it made my website look 84% better! thanks!!!

  • @masterV12
    @masterV12 Рік тому

    Got my shit working thanks to this vid. No other content out there could explain it in general terms so I could apply it to my own use case. Excellent work!

  • @marimoon7296
    @marimoon7296 8 місяців тому

    This is the most amazing css video i have ever seen thank's for this quality video

  • @dalimkumardas3760
    @dalimkumardas3760 2 роки тому

    I speak Bengali. But the way I saw your video, I understood perspective. Even after watching Bangla video, I could not understand it so well . You are the best

  • @mawyn-chamreunnhek905
    @mawyn-chamreunnhek905 2 роки тому +1

    That tutorial was fantastic! Everything was clear and now I'm able to create what I always was fascinated by. Thanks a lot!

  • @MrWannaBAlone
    @MrWannaBAlone Рік тому

    omg, this is so simple and I never thought about it this way. You are brilliant!

  • @honiel59
    @honiel59 2 роки тому

    Finally I can implement easily parallax effect in my website. Thanks a lot.

  • @suchithkumargm
    @suchithkumargm Рік тому

    amazing video...actually loved it very much.
    the basic concepts are rellay clear now
    thank you kyle

  • @vatsalyasinghi438
    @vatsalyasinghi438 2 роки тому

    Amazing ! Have been wanting to implement Parallax effect since forever.. Thanks for the awesome video !

  • @eliimraan3953
    @eliimraan3953 2 роки тому +5

    Thank you for making awesome videos. I learned alot from watching your vids

  • @kitastro
    @kitastro 2 роки тому

    Best and most concise explanation of how to do this. Thank You.

  • @jordon6067
    @jordon6067 2 роки тому

    I really appreciate how this is 83% better and not 82. Thank you for another amazing video!

  • @thePlasmoids
    @thePlasmoids 2 роки тому

    you tube needs to put text shadow on the chapters in the video. love the channel

  • @_erfanm96
    @_erfanm96 2 роки тому +1

    This is a clever way to create parallax effects, thanks for sharing.

  • @hanesmitter1469
    @hanesmitter1469 2 роки тому +1

    It still tricks my brain on what is twice as far and what is halfway farther

  • @jedbmorris
    @jedbmorris 2 роки тому

    Awesome- Gonna try to implement this on my site today. Thanks Kyle!

  • @in2minutesorless64
    @in2minutesorless64 2 роки тому

    That was an excellent tutorial Kyle!

  • @MrBonbatong
    @MrBonbatong 2 роки тому

    Thanks for sharing this amazing trick with CSS. Also I wanted to point out your great ability to explain clearly what you're doing. Your job is just awesome!

  • @bobdinitto
    @bobdinitto 2 роки тому

    OMG I love this! Awesome effect with just CSS. Thank you, Kyle.

  • @tomislavstasina8451
    @tomislavstasina8451 Рік тому

    Exactly what I was looking for, explained clear and simple. Great work!

  • @juhigupta543
    @juhigupta543 3 місяці тому

    thank you so much for explaining it all so simply

  • @richardbromilow4735
    @richardbromilow4735 2 роки тому

    this is really cool! dude your channel is GOLD

  • @mohammedhamidu9003
    @mohammedhamidu9003 2 роки тому

    This is awesome, I just realized the illusion I used to see on some screen. Weldone Kyle

  • @TomatoPana
    @TomatoPana 2 роки тому

    This kind of video reminds me that I need to study more CSS right now. AWESOME!

  • @reymbayjumabaev6779
    @reymbayjumabaev6779 Рік тому +1

    Than you for much bro ✊🤝

  • @CirTap
    @CirTap 2 роки тому +1

    Thank you & well explained! The first parally example that actually made sense!
    I never understood what the value of perspective actually ment.
    Virtually all examples or tutorials just use massive "magic" numbers and never explain why *that* number (or not) and what the consequences are and what to look out for.

  • @nikhiltalokar6000
    @nikhiltalokar6000 2 роки тому

    Great Job...! Thanks for this video and you explained each and every property very well... I am going to use this parallax in my resume portfolio...

  • @Aleksandr.Matveev
    @Aleksandr.Matveev 2 роки тому

    it's genius. thank you from Quebec, Canada

  • @surajitdas6555
    @surajitdas6555 2 роки тому

    Never thought that this could be achieved in this smart way... Thanks Kyle for sharing your knowledge...

  • @robertholtz
    @robertholtz 2 роки тому +3

    8:45 - What exactly happened there where the background shifted a couple of pixels to the right leaving a slight margin of white pixels on the left? You concluded the video with that glitch still in there.

    • @r-i-ch
      @r-i-ch 2 роки тому +1

      Just increase the scale a little bit to 2.1 and 1.6 and it'll fix.

  • @CreativeTutorialsWeb
    @CreativeTutorialsWeb 2 роки тому +1

    Awesome work Kyle love your content

  • @nac9880
    @nac9880 2 роки тому

    Dang, I was looking for how to make my website look 83.1% better. This ain't enough!!!

  • @WayneBarroncffcs
    @WayneBarroncffcs 2 роки тому +1

    Love the information you provided in this video.
    Have to ask, can you jam some of the Jackson and post that to your channel?
    That would totally rock, my friend.
    Keep up the incredible work.
    Wayne

  • @pmcomputer1
    @pmcomputer1 2 роки тому +1

    Great video and content. One of my favorite teachers. but what's up with the tempo. Is your cellphone's battery dying and you got to finish the video before it cuts off in mid sentence?

  • @elkcityhazard
    @elkcityhazard 2 роки тому

    always nice to have another non javascript method to accomplish a goal. nice job.

  • @Cet3010
    @Cet3010 2 роки тому

    This is great! Amazing how easy it is. Thanks for the tutorial!

  • @danisob3633
    @danisob3633 2 роки тому

    this is so niceee. i really like that it doesnt need javascript

  • @CesarICAO
    @CesarICAO 2 роки тому

    woaaa!!! awesome trick, super simple 😃 and super powerful 💪 and super cool 🤯🥳, thanks!!! Greetings from Mexico!!!

  • @vhellinga
    @vhellinga 2 роки тому

    You are a really great teacher! Thanks so much for sharing

  • @jamesranawadia
    @jamesranawadia 2 роки тому

    You are a superstar mate

  • @bara2c
    @bara2c Рік тому

    super great tutorial, and great explanation

  • @hecmen84
    @hecmen84 2 роки тому

    Thanks. Now I understand the use of perspective

  • @CloudBroadcasts
    @CloudBroadcasts 2 роки тому

    Very impressed.. again! Thank you very much!

  • @SK-vg3mw
    @SK-vg3mw Рік тому

    Thank you! Really great stuff! 👍

  • @nairanvac79
    @nairanvac79 2 роки тому

    I'm so excited for Kyle that he finally got some furniture!

  • @anwarshaikh8090
    @anwarshaikh8090 Рік тому

    Awesome tut my friend

  • @SazikimiJaeger
    @SazikimiJaeger 2 роки тому

    My minds were just blown away... Thabks for the such an awesome tutorial Kyle... I hope I wrote your name correctly...
    Thanks a bunch mate! It's very helpful, I'll start using it soon. It was very easy, clear instructed, clearly explained tutorial to understand to the maximum 🥺😇🔥🤩

  • @singInTheDarkness
    @singInTheDarkness 2 роки тому

    You make everything looks so easy 🤩

  • @yusiff
    @yusiff 2 роки тому

    Great explanation!

  • @nihilidron
    @nihilidron 2 роки тому

    OMG, how come I didn't know it's possible. Always used js for that.Thanks, man. :)

  • @Skykristal
    @Skykristal 2 роки тому +1

    Pretty cool! Definitely trying that out

  • @expertreviews1112
    @expertreviews1112 2 роки тому

    Sensational stuff! Top drawer!!!

  • @damianocaon9293
    @damianocaon9293 Рік тому

    THIS IS AWESOME! THANK YOU

  • @krishnakokane24
    @krishnakokane24 11 місяців тому

    Helped me alot. Thanks

  • @acalavidyaraja
    @acalavidyaraja Рік тому

    Hi there! Thank you for this great explanation. I did it with five images instead of two and I left out the >>transform:translateZ() scale()

  • @Danroberts1984
    @Danroberts1984 2 роки тому +4

    I love this so much 💗 The parallax effect using this css method is so buttery smooth compared to other methods I've tried in the past and so much more performant. It's a shame it doesn't play too well with gsap 3 scrolltrigger when animating other elements on the page... or maybe I'm just being dumb. It's there a simple workaround I'm missing?

  • @alanleeimaging
    @alanleeimaging 2 роки тому

    You're the best, Kyle! Thanks again.

  • @safebh8841
    @safebh8841 2 роки тому

    great one bro very helpful

  • @r-i-ch
    @r-i-ch 2 роки тому

    This is great. I think you need to scale up the images a bit more to get rid of a couple of pixel whitespace border on the left.

  • @nathanielnizard2163
    @nathanielnizard2163 2 роки тому

    Looks like a nice way of putting a bit of wow effect on a website without completly ruining the ui. The thing is that it can be used everywhere, I consider myself good at programming but those front end stuffs, they really make me feel stupid at times ^^'.

  • @vibhakar_s
    @vibhakar_s 2 роки тому

    U deserve more 🙌🏻❤️🔥

  • @Jolterix20
    @Jolterix20 2 роки тому

    This is so cool, thanks a lot Kyle!!

  • @RDdggrd
    @RDdggrd 2 роки тому

    Thank you, u explained it very well and that too in a simple way.

  • @AJman14
    @AJman14 2 роки тому +52

    I've tried this method before, but it unfortunately breaks some scrolling methods, like page down. For accessibility, I ended up using JS.

    • @Andrei-rp3dz
      @Andrei-rp3dz 2 роки тому +8

      How can you implement this with JS?

    • @va9if
      @va9if 2 роки тому +7

      @@Andrei-rp3dz apply translate y according to scrolling

  • @maskman4821
    @maskman4821 2 роки тому

    Thank you Kyle for this awesome tutorial, I have learned something new 🤩

  • @yao_barna
    @yao_barna 2 роки тому

    Great content!! Cheers 🥇

  • @MrMrimmer
    @MrMrimmer 2 роки тому

    Great tutorial!

  • @florasoler3675
    @florasoler3675 Рік тому

    Fantastic! Thank you 🙏

  • @xMoSicc
    @xMoSicc 2 роки тому

    Great video as usual

  • @P00ters1
    @P00ters1 2 роки тому

    love ur videos as a beginner.

  • @DimiArhontidis
    @DimiArhontidis 2 роки тому

    Holy crap! So nice, thanks!!

  • @pedromartins7046
    @pedromartins7046 2 роки тому

    awesome, very simple to understand

  • @GR_BackingTracks
    @GR_BackingTracks Рік тому

    My class video didn't get it through to me, neither did another highly successful CSS Tuber, but *this* video taught me...
    PS Try Jamming along with my guitar videos { :