The Easiest Website Menu That Will Wow Any User

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • Watch as I show you how to make a website header that WOWS using HTML, CSS, And JavaScript. And the best part is, it'll only take 2.5 minutes!
    Support the channel: ko-fi.com/hype... (accepts PayPal, card, etc).
    CodePen: cdpn.io/bGvejNY
    DNA Capital: dnacapital.com
    Music Credits:
    Track: Daydream - Land of Fire [Audio Library Release]
    Music provided by Audio Library Plus
    Watch: • Daydream - Land of Fir...
    Free Download / Stream: alplus.io/dayd...

Комментарии • 301

  • @invictuz4803
    @invictuz4803 Год назад +330

    I'm not sure what's more impressive, your ability to teach these cool effects or your ability to make world-class videos. Just wow!

  • @netsaosa4973
    @netsaosa4973 Год назад +12

    Why would you make it look like a free WordPress website

  • @ShadowVipers
    @ShadowVipers 2 года назад +735

    You could make it slightly more modular by setting the index as a css variable, then multiplying the index by your modifier, this way you won't be repeating effectively the same complex selector 4 different times per animation effect. Other than that, it looks really awesome!

    • @briannoh9235
      @briannoh9235 Год назад +12

      If you don't mind, could you code out what you mean by this?

    • @UwU-uq9pq
      @UwU-uq9pq Год назад

      is it something like - - index ?

    • @ShadowVipers
      @ShadowVipers Год назад +11

      @@UwU-uq9pq yes I'll post some code tomorrow.

    • @briannoh9235
      @briannoh9235 Год назад +2

      @@ShadowVipers Would you be able to explain how item.onmouseover works without defining item? Isn't it being used as a parameter? Also how do we access the CSS attribute #menu[data-active-index=#] when the property in our JS is called menu.dataset.activeIndex?
      Actually don't think I understand this because it's not working in my own code. Kinda new to this, any help/direction would be helpful :D

    • @ShadowVipers
      @ShadowVipers Год назад +124

      ​@@briannoh9235 So to answer the first question (I'll answer the second in the next comment) the I'll take the code from the video and change it a bit, for the JavaScript:
      const menu = document.getElementById("menu");
      Array.from(document.getElementsByClassName("menu-item"))
      .forEach((item, index) => {
      item.onmouseover = () => {
      menu.style.setProperty("--active-index", index)
      }
      });
      For the CSS we'll do:
      #menu > #menu-background-pattern {
      background-position: 0% calc(-25% * (var(--active-index, 0) + 1));
      }
      #menu > #menu-background-image {
      background-position: center calc(45% + 5% * var(--active-index, 0));
      }
      And then you can clear the other 3 selectors that start with the #menu[data-active-index="{index}"]
      The "0" which is in "var(--active-index, 0)" is just a default value in case our variable of "--active-index" hasn't been set yet.

  • @reportaccounthcc2463
    @reportaccounthcc2463 Год назад +3

    The use of divs for every element instead of has triggered me

  • @omersabic8555
    @omersabic8555 2 года назад +61

    Absolutely amazing, love both the idea and execution. Keep it up!

  • @WillFlores1
    @WillFlores1 Год назад +23

    This has quickly become my favorite web development channel on RUclips. It's like Fireship but for CSS and UX/UI Design.

  • @PaulMcCannWebBuilder
    @PaulMcCannWebBuilder Год назад +27

    Teaching at this level (without stopping to explain every property and value) is downright powerful.
    Maybe I'm your target audience (I understood all the code), but I hope anyone viewing this stuff knows that the syntax is not the process.
    Figure out what you want to do before you learn how to do it.

  • @hatempire
    @hatempire Год назад +37

    The storytelling vibes of your videos are being way better to truly learn frontend than some courses. Thank you for the content!!

  • @its_abdu4925
    @its_abdu4925 Год назад +76

    Man this is the kind of explaining i'm looking for, in depth, you would make a great teacher.

  • @LW0832
    @LW0832 Год назад +14

    Great video. Love it
    But i got a nice clean way to set the elements opacity when hovered. Instant of setting the opacity and overriding it for one element later on, use the not operator to exclude the hovered element. It would look like this: .menu-item:not(:hover) { opacity: 0.3}. This way you use it for all the .menu-item elements except for the hovered one.
    Have a good one :)

  • @discoRyne
    @discoRyne Год назад +2

    Cool concept but design-wise it's a bit invasive tbh. Less is more works better here IMO (eg. minimal / no background, more emphasis on typography, relative content to the navigational items, etc.) The background image and dotted pattern just looks a bit corny and distracting in all honesty.

  • @mayukhchanda5805
    @mayukhchanda5805 2 года назад +36

    Your videos are gold mine for developers. Just one ask, can you show how to create responsive web pages while still keep the Immersive feature. I find it easier to reacreate some of these effects easily on bigger screens, but relatively difficult to do the same for Mobile screens. Thanks in advance.

  • @Meyu-Sys
    @Meyu-Sys Год назад +3

    It seems like my data-active-index is not updating on mouse hover i even tried copying your code from codepen could anyone please help me

    • @kamblikritarth
      @kamblikritarth Год назад

      I have the same difficulty rn

    • @nerdy_lj
      @nerdy_lj Год назад

      I had the issue aswell.. for me it got fixed after i realized that my JS was imported in the
      U need to import it at the end of tho...
      So right before add your to import the JS... (TBF I tried to built htis on a preset html file i wrote some time ago so that's why my script was outside the body)

  • @yourix2
    @yourix2 Год назад +3

    I would have used an unordered inside a tag. It's much more semantic. But great video's! I just subscribed

  • @IsxaaqAcademy
    @IsxaaqAcademy Год назад +1

    It's really a real wow!
    "Humm! for the 1st time I know one place that I can use the Index concept"
    ~ A JS beginner talkin' to himself

  • @electrolyteorb
    @electrolyteorb Год назад +8

    Love, love love, loved the style, loved the code, loved the approach, loved the pacing..... Loved everything.... Here goes a like and sub😍😍😍

  • @mediocreman6323
    @mediocreman6323 Год назад +1

    This is really bad design, for on one hand, less is more, and on the other, the human visual system has a tendency to focus on whatever moves contrary to what stands still, for obvious evolutionary reasons, but what you do with this design is to have people focus on the background and not on the menu. Just don't do it.

  • @victorvaleanu
    @victorvaleanu Год назад +1

    What is the point of the hover animation though? The burger menu should only display on small screens, phones, tablets, which have touch screen, hover only works with cursors. Am I missing some usecase?

  • @TheScriptingLegend
    @TheScriptingLegend Год назад +13

    0:45 instead of making those separate selections you could use the not operator so for the link opacity thing you’ll just have:
    .menu-items:hover > .menu-items:not(:hover){
    opacity: 0.3;
    }

    • @Flowwid
      @Flowwid Год назад +1

      can you explain it please? I'm still new hehe

    • @todoz11
      @todoz11 Год назад +2

      @@Flowwid the way it's done in the video, when you hover over one menu item, it lowers the opacity of every single one, and then increases the opacity of the one you hovered over back to 100%
      but in the way the comment suggests, when you hover over one menu item, it only looks to lower the opacity of every item that ISN'T being hovered over, so the one that you hover over stays fully visible

  • @DemonAbigor
    @DemonAbigor 8 месяцев назад +1

    For those that , after js part if it is not working, just move your js file at the end of the body and it will work fine.

  • @yopp1234
    @yopp1234 Год назад +2

    Don't forget to use semantic HTML tags

  • @tomdunn3960
    @tomdunn3960 Год назад +1

    Anyone else having an issue getting this to work it seems like a really cool design but the js is not working for me.

  • @duruiz
    @duruiz Год назад +6

    that's a great tutorial, quick and informative!
    I would recommend taking more semantic approach to the menu like using nav tags, maybe reduce the amount of divs using pseudo elements and most important take care with the opacity of readable texts because it really prejudice users with vision impairments, so always check your text contrast with wcag contrast checker :)

    • @duruiz
      @duruiz Год назад +2

      another great approach to better accessibility would be using a preffer reduced motion media query to avoid those cool movements for users who could have some dizziness because of it. 💛

    • @sayamqazi
      @sayamqazi Год назад +2

      I have an incurable vision impairment and I agree with you wholeheartedly about text colors. I hate modern design of gray texts. About the animations, they look cool the first couple times. Especially when they are for sliding dialogs, views etc. Power users tend to interact very fast and the animations of new elements appearing and disappearing feel like a bottleneck.

  • @BeTheNiche
    @BeTheNiche Год назад +2

    This is super late comment, but I saw many people mention the background not moving after the js part. I'm only 3 days into HTML/CSS/ day 0 on JS. This is what fixed it after an hour of playing around with it. It involves putting "background-position 800ms ease;" into the #menu-background-position css section in the transitions area. GL everyone!!
    #menu-background-pattern {
    height: 100svh;
    width: 100vw;
    background-image: radial-gradient(
    rgba(255, 255, 255, 0.1) 9%,
    transparent 9%
    );
    background-position: 0% 0%;
    background-size: 12vmin 12vmin;
    position: absolute;
    left: 0px;
    top: 0px;
    z-index: 1;
    transition: opacity 800ms ease,
    background-size 800ms ease,
    background-position 800ms ease;
    }

  • @detectivetacco2085
    @detectivetacco2085 Год назад +2

    "it is absolutely easy to recreate"
    DNA Capital:

  • @marianl8092
    @marianl8092 Год назад +1

    hello i get the activeIndex as should but it seems the activeIndex has no influence when i try to use it in css.
    CSS: .menu[data-active-index="0"] > .menu-background-pattern {
    background-position: 0% -25%;
    }
    console.log(menu):
    ​​
    why wouldnt it run? is it incompatible with react?

    • @bradrimer
      @bradrimer Год назад +1

      I'm not entirely sure, if that solves the problem, but shouldn't it be: "#menu[...]" and "#menu-backg..." instead of ".menu" and ".menu-backgr..."?

    • @marianl8092
      @marianl8092 Год назад

      @@bradrimer hello and thank you, i have tried that and it did not work in react. i even pasted the original code from Hyperplexed's Codepen inside a React app create with npx, but it wouldnt work either

  • @sander8928
    @sander8928 Год назад +1

    This is what I did with Flash 25 years ago 😜

  • @enshen2190
    @enshen2190 Год назад +3

    First YT channel that is actually making me interested in coding, keep it up!

  • @sbongoog
    @sbongoog Год назад +1

    I like it but why not use ":not" ?

  • @fvbixn
    @fvbixn Год назад +6

    Would be even greater if you've used semantic HTML, so , , , etc. 😊

  • @cool-aquarian
    @cool-aquarian Год назад +1

    This is just good for novelty.
    Tbh, if I were to face this kind of menu in my day-day work(like reading documentation), I will go mad.

  • @muskreality
    @muskreality Год назад +1

    For sophisticated developers you can utilize Ctrl+C & Ctrl+V command

  • @cappngeech
    @cappngeech Год назад +1

    each time i hover over an item, the background pattern moves maybe a millimeter. i have his code copied entirely, but it seems to not be working. any suggestions?

    • @alexkim104
      @alexkim104 Год назад

      same here.. i have no idea what went wrong

    • @cappngeech
      @cappngeech Год назад

      @@alexkim104 i figured it out btw, i had the background pattern tied to ‘background-position’ instead of ‘transform: translate(x% y%)’

  • @shahbokhari
    @shahbokhari 4 месяца назад

    Absolutely Amazing Techniques. Thank You

  • @reegyreegz
    @reegyreegz Год назад +1

    Cool and all, but from my personal user perspective i cant stand minimalistic and overly fancy websites. Not sure what it is, but i find it more annoying and distracting when im genuinely looking for a business or service and browsing through their websites. Just keep it simple and convey your businesses intent without putting on a dramatic display of creativity I have no interest in.

  • @Anth-ony
    @Anth-ony 2 года назад +15

    Just wanted to say that I came across your channel through someone on Twitter shouting you out as being very underrated. Boy were they right. Great content and style of videos! Can't wait to see where this channel goes and hope that you become the next big thing!

    • @Hyperplexed
      @Hyperplexed  2 года назад +1

      Thanks so much for saying that! Happy to have you along for the ride haha!

  • @csfromthecouch5538
    @csfromthecouch5538 Год назад +2

    You're absolutely amazing, it's been so long since I've seen a channel whose content I've enjoyed watching so much! Cannot wait to see more!

  • @melodium10
    @melodium10 Год назад

    Hyper : telling us to say feedback
    me who already typed "Amazing" in the comments just before sending it : I'm 12 universes ahead you!

  • @MatthewMichalsky
    @MatthewMichalsky Год назад +1

    Markup-wise, you could’ve used nav and ul elements

  • @peridiusoverlord
    @peridiusoverlord 5 месяцев назад

    I don't understand how to link this to my HTML? I've tried to follow along but when it comes to applying the stylesheet to the actual html menu, doing the typical href file linking process doesn't work? What the heck am I supposed to do??

  • @thomasventura6412
    @thomasventura6412 Год назад

    yeah this code straight up like doesnt work so....yah
    edit: he makes a mistake in the video
    on #menu-background-pattern in css add "background-position: 800ms ease"

  • @mattshnoop
    @mattshnoop Год назад +6

    Just a note, you don't need to "convert it to an array so it becomes iterable." The object returned by getElementsBy[whatever] doesn't have a .forEach, but it is iterable. I would use a for-of loop in this case.

    • @memelord4639
      @memelord4639 Год назад

      he used the index so for of wouldn’t work by itself, what he did was fine to me for his specific use case

    • @paradoxify_
      @paradoxify_ Год назад

      I think if he had used the querySelectorAll to get elements instead of by class name then there'll be no need to convert to Array. You can use forEach to iterate then.

  • @Talaxianer
    @Talaxianer Год назад +1

    Can you make the menu item text a little bit bigger? I can't read it

  • @bastje
    @bastje Год назад

    Most of this code is very easy. Only the data-active-index fascinated me, I am gonna try it out, thnx for the idea! :)

  • @abderrahimlaribi8256
    @abderrahimlaribi8256 Год назад

    How did you make thr background move just by moving the cursor ?

  • @delqyrus2619
    @delqyrus2619 Год назад

    It "wows" me, how you get a completely useless website out of this, with the least effective resources, in a totally useless manner, without reusability. Like a car, built of McDonalds fries - and only of this specific ones - which can't transport anything but itself, not even a driver.

  • @iamnatis
    @iamnatis Год назад

    Nice video but I question IDs in CSS. My build/watch commands fail when an ID is detected in CSS as they never should be there.

  • @Ahmed-sr6gv
    @Ahmed-sr6gv Год назад +2

    You make everything seems easy and enjoyable to reconstruct!

  • @MCroppered
    @MCroppered Год назад

    Why force so much croaky intonation and nasalisation? I’m a firm believer that you are alienating so many potential viewers as the LA valley girl voice is very grinding/off putting of the otherwise spectacular content.

  • @SoapinTrucker
    @SoapinTrucker Год назад

    This video so rocks, thank you, AND Shadow Vaper ;)

  • @jorgepvenegas
    @jorgepvenegas Год назад

    Welp, I'm subscribed to your channel now :)

  • @truvc
    @truvc Год назад

    Nice CSS. You should use nav and li for a11y tho.

  • @prashantd6252
    @prashantd6252 Год назад

    Are you "m8micking" fireship?? Dude that is not ok 😕

  • @kumarutsav1123
    @kumarutsav1123 5 месяцев назад

    Every time I watch a video on this channel, I get Hyperplexed 🤯

  • @MrSL101
    @MrSL101 Год назад

    I don't get it, yes it looks amazing, but almost everyone and their mothers use mobile phone, you should focus more on how this interact with phone browsers more.

  • @dangduong5362
    @dangduong5362 8 месяцев назад

    Do rgba(2255, ...) and rgba(255, ...) make no different?

  • @fastexpand
    @fastexpand Год назад

    I used to have an undying hatred for web programming but now, thanks to your videos, it’s just a dying hatred

  • @-Name-here-
    @-Name-here- Год назад

    Ngl I wanna learn css/html now lol. I’ve tried before and I just hate it 😂

  • @AM-ws1kg
    @AM-ws1kg Год назад

    the code you wrote at 1:55 doesn't work for me
    can someone help me and explain why the background doesn't move?

  • @marianl8092
    @marianl8092 Год назад +1

    seems to not work in react app. sad

    • @user-xw4mu6nz4t
      @user-xw4mu6nz4t 4 месяца назад

      It's HTML, CSS and JS. It will work in a React app (because React, is JavaScript itself), the only conclusion here is there's a mistake on your part somewhere.

  • @gamingblast2325
    @gamingblast2325 Год назад

    what is data-active-index and menu.dataset.activeIndex are they inbuild in javascript

  • @JoelAguilarCerna
    @JoelAguilarCerna Год назад

    bad explanation, I am new, I do not know where should I applied the css configuration you didnt even mention that, is it in the head or in the body?

  • @skrewed
    @skrewed Год назад

    This content was o-kay. Idk why but i didn't like this one as much of the rest of your work here in this channel

  • @bombrman1994
    @bombrman1994 11 месяцев назад

    I was wondering can these things be done with unocss or tailwind or css is just a raw language that can be played with instead of dealing with classes from other libraries

  • @crispy.caesus
    @crispy.caesus Год назад +1

    yoooo

  • @PaweSawickiPL
    @PaweSawickiPL Год назад

    Would that work for mobiles?

  • @gaurav_W
    @gaurav_W Год назад

    except for the javascript which can be better everything else looks nice

  • @JohnLT999
    @JohnLT999 Год назад +1

    Just love your simple explanation!

  • @c0ffeeIT
    @c0ffeeIT 5 месяцев назад

    Very nice, but why not use a nav element with an ul inside containing the menu items (anchor tag)

  • @vickmackey24
    @vickmackey24 Год назад

    The parallax fad can't go away soon enough. 🤮

  • @sekki2554
    @sekki2554 Год назад

    I like it just clean tbh, this is already too much for me

  • @balogunmuhammadawwal1316
    @balogunmuhammadawwal1316 Год назад

    Like seriously I need a CSS teacher like you or do you have any course

  • @rishad4907
    @rishad4907 Год назад +1

    How do I link the js to the html file

  • @shoobidyboop8634
    @shoobidyboop8634 Год назад

    Can you convert this to COBOL for me?

  • @alex-suciu
    @alex-suciu Год назад

    pretty cool. however you should use the native HTML element for menu and not div :)

  • @andymutale368
    @andymutale368 Год назад

    Im gonna implement this on the site im currently building

  • @elcontrastador
    @elcontrastador 6 месяцев назад

    Excellent video! Subscribed!

  • @MaximeCHEVASSON
    @MaximeCHEVASSON Год назад

    Pretty cool, but what about the responsive

  • @WarframeCrunch
    @WarframeCrunch Год назад

    LOL! Dude I was all the time scalling fonts like this:
    .title {font-size: 24px}
    @media (max-width:1400px){
    .title{ font-size: calc(12px + 2vw)}
    }
    Then I had to check if the font size match the switch size in range of 1400px nad 1401px
    And you just showed me that I can use clamp instead of calc and use @media size screens😮‍💨, I didn't know about clamp LOL.

  • @qubism
    @qubism 2 года назад +1

    Pleasure to watch this. :)

  • @itsthemangler
    @itsthemangler Год назад

    Heard "as per usual" and had to click off.

  • @dag.3r504
    @dag.3r504 Год назад

    Me who doesn't know how to center a div: 👁👄👁

  • @softvibes1602
    @softvibes1602 Год назад

    I didn't like your font choice btw

  • @natalieeuley1734
    @natalieeuley1734 Год назад

    That should be a nav with a ul and a bunch of li's, not divs

  • @user-fed-yum
    @user-fed-yum Год назад

    Huver? I think you meant hover.

  • @LyrelGaming
    @LyrelGaming 2 года назад +1

    Underrated!

  • @djbolodocaco775
    @djbolodocaco775 Год назад

    how would this respond in moblie? if possible

  • @RoleModelFather-bc5eq
    @RoleModelFather-bc5eq 10 месяцев назад

    love your content. Take my like!

  • @denethsathsara4049
    @denethsathsara4049 Год назад

    You would make a very good teacher.

  • @wizardBoy7
    @wizardBoy7 10 месяцев назад

    idk why but I had to tweak a few things to make it work

  • @Shampoid
    @Shampoid Год назад

    this is great
    too bad html is not a coding language

  • @Glendragon
    @Glendragon Год назад

    Why not use instead of div?

  • @interrrp_with_three_rs
    @interrrp_with_three_rs Год назад

    You and Fireship should collab

  • @kailashjoshi4708
    @kailashjoshi4708 2 года назад +1

    I'm brand new to coding and ui ux design but I have some experience in graphic design and I was wondering what software you use so I can start learning to code

    • @chillchannel8658
      @chillchannel8658 2 года назад

      Web design is normally CSS, HTML and Javascript

    • @jancarldampil4803
      @jancarldampil4803 2 года назад

      There are alot of code editors you can use like sublime text, vs code, atom, vim (if you are a maniac), etc. But have you already started a local dev environment? Without it you can't start web development

    • @sharkyboi6018
      @sharkyboi6018 Год назад +1

      I would just use VS Code

  • @surfboard661
    @surfboard661 2 года назад +1

    Thanks bro, keep it up.

  • @TheMetalMag
    @TheMetalMag Год назад

    excellent! thank you

  • @WarframeCrunch
    @WarframeCrunch Год назад

    Problem with that background-image doesn't scale well on all device sizes or screen size
    Instead I put background-size:cover; scale: 1.1
    then on hover scale: 1;
    Now it scales well but the issue is that is doesn't move on some screen sizes, but atleast it's not repeating background.

  • @paradox8425
    @paradox8425 Год назад

    2 minutes and 56 seconds is not 2.5 minutes

  • @plugpulled
    @plugpulled Год назад

    Made this thing some 8 years ago.

  • @andreslugo9947
    @andreslugo9947 Год назад

    that's actually 2.9 minutes