Creating A Simple Website Intro Screen (Splash Screen) Using HTML / CSS / Vanilla JavaScript

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024
  • Hi Guys,
    Another quick video where I show how to build a simple website introduction splash screen using vanilla JS. As always if you have any questions then please do not hesitate to contact me.
    Thanks
    Conor

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

  • @epicbattles3887
    @epicbattles3887 2 ปีที่แล้ว +10

    so for those that have problems with having the splash screen removed. I gave an id of "splash" to the splash screen in the html file and replaced the splash.classList.add with - document.getElementById("splash").style.opacity = 0; . Also add an alert("asdasda"); in the function to make sure that everything works up to that point. Thank you for the tutorial

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

      I had that problem...and i did what you said....but now the website is not clickable...do you had that same problem?

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

      ​@@samirfelisberto6404 I had the same problem. I fixed it with document.getElementById("splash").style.display = 'none'; I wrote separately the same function, only change that
      document.addEventListener('DOMContentLoaded', (e) => {
      setTimeout(() => {
      document.getElementById("splash").style.display = 'none';
      }, 2000);
      })

    • @yourshadow102
      @yourshadow102 7 หลายเดือนก่อน

      @@jordan_gon Thanks bro. God bless you

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

    Noob here..
    So what’s happening is you style the splash screen, then use the javascript to manipulate it (2 seconds of it made visible)
    then go back to css to hide that screen … thank you so much. Gonna spend some time going over the function you created. This video was so helpful!!

  • @ShamynBabumh-yj5ck
    @ShamynBabumh-yj5ck หลายเดือนก่อน

    ejactly what i was looking for

  • @lutencoconstantin7820
    @lutencoconstantin7820 3 ปีที่แล้ว +2

    NOTE* there is a difference between 0 and 0px, i don't know how but some CSS properties like (background, transition) will simply go wrong or not work at all.
    For example: in my case transition property will not define the fading duration but the animation time!
    So pay attention to these little details.

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

    Great content, thanks!

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

    my splash screen does not disappear, what should I do?!?

  • @muhammadsyukurabadi3000
    @muhammadsyukurabadi3000 3 ปีที่แล้ว +1

    thank you very much Conor! this video helps me on building my portfolio website!

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

      Awesome Muhammad! Thanks for watching! Glad it helped mate.

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

    No GSAP or other library! Fantastic!

  • @kkuanghuh
    @kkuanghuh 4 ปีที่แล้ว +7

    Is it possible if you could maybe release the source code to the video? I'll help out a lot. Thanks. :)

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

    Hello i really like your tutorial. But how do i make it so that the "welcome to my website" fades out and then my logo pops out?
    And is this mobile responsive?
    Thanks in advance!

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

    Very useful tutorial, starting rock bottom, thank you

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

    thanks a lot man :-) creating a little learning app in Cordova for my daughter and needed a little splash :-)

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

      Awesome! Glad it helped! And good luck with the app! Post a link here when you’re done 😀

  • @arkagrawal1879
    @arkagrawal1879 3 ปีที่แล้ว +1

    Hey Conor! everything worked well but the splash screen is not removing to the main page

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

    Hi, Conor! Thank You for this tutorial. What about another pages of site? This intro screen will load every time other pages are loaded, right?

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

      Dennis Dovziy Hi Dennis. Thanks for watching and for your comment. Yes the splash will load for every page as long as you include the splash screen code from this video in every html file.

  • @RishVidsCocktaill
    @RishVidsCocktaill 4 ปีที่แล้ว +6

    Any way to display this splash only once?

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

      Don’t see the rest of the css code, it starts at line 33, what about the rest of it ?

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

      Yea, would really want to know how to

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

    Great tutorial, easy to follow. Subbed

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

    helped me a lot with my project. Thanks :)

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

    Such a big help mate,, you're a really clear and good teacher. Keep up the good work... ps. would this work for a PWA app when checking on google lighthouse?

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

    REMARKABLE!!! Thank you

  • @omegazfusion5647
    @omegazfusion5647 7 หลายเดือนก่อน

    what about a title drop down animation? could you do a video on that?

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

    Thank you!!! Awesome explanation

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

    Great explanation!!

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

    Thanks for the nice tutorial. I am no CSS wizard, so I need some help. I tried your code and got exactly everything similar to yours except the text which in my case is displayed at the top of the splash screen, how do I center it vertically?

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

      Hi Amine. Would you be able to share your css on here? I’ll take a look for you

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

      @@ConorBailey Thank you Conor. When I wanted to share the code with you via CodePen, it worked there (codepen.io/aminemarref/pen/OJMQdKK)... In my website, I use bootstrap. Could it be doing something against the splash CSS?

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

      @@ConorBailey .. and it's actually Bootstrap. When I removed it, I got your code working perfectly.

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

    Awesome, thanks :D

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

    Hi! Thanks for sharing your knowledge, very useful! subscribed :)

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

      Awesome! Cheers Victor! Glad it helped mate!

  • @AnubhavGogo
    @AnubhavGogo 29 วันที่ผ่านมา

    How can we make the splash screen appear only once per session? Thanks!

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

    How can I make this not load the animation on subsequent loadings of the page? When my users click the logo in the top left to return home, the animation plays again. Can I tell the browser not to load the script a second time?
    I know I'm a bit late to this and it may have already been asked.

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

    Thankyou for this Tutorial.
    Anyway, I cannot make my "Welcome" word in the center of my page. It just appeared in the top center of my page. What should I do ?

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

    Is there a way to make the splash screen full screen. My nav bar and footer still show and allow me to scroll.

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

    I just followed your steps after completion it stopped on "welcome to my website"only it will not go to next conor baley page.please help me out from this situation...

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

      venkatesh nani k hi mate. Can you comment your js code and I’ll take a look. Cheers

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

      const splash = document.querySelector('.splash');
      document.addEventListener('DOMContentloaded',(e)>={
      setTimeout(()=>{
      splash.classList.add('display-none');
      },2000);
      })
      const header = document.querySelector('.header');
      window.onscroll=function(){
      var top=window.scrollY;
      console.log(top);
      if (top >= 50){
      header.classList.add('active')
      }
      else{
      header.classList.remove('active');
      }
      }

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

      venkatesh nani k hi mate. Maybe its the ‘l’ in DOMContentLoaded. Should be a capital L.

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

      Replaced it, am not getting

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

      Index.html line number 6 one link is there

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

    Hi thanks for the tutorial, but please can I have the beginning of the css code? I don't have the beginning of the code so it stays on the fade-in page so I can't see the lorem ipsum page.

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

    Hi, everything is good on my own but cant see the welcome text at all, from the beginning et to the end

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

    Hi is there a way to make te splash appear only on the first visit?

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

    Muito legal, gostei!

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

    How does it work if I wanna use a picture instead of a text for app design in cases of splash screen?

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

      just make a div and set the picture's url on it in css

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

    Thank you very much

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

      Glad it helped parme. Thanks for watching!

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

    Would I be able to code this into shopify or wix?

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

    Instead of words, may be an image ? How to do that?

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

    Thank you!

    • @ConorBailey
      @ConorBailey  3 ปีที่แล้ว +1

      Thanks Luca. I made an updated version of this splash screen in this video if you need further inspiration 👍

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

    After completing code my main page doesn't show up . Screen remains on splash screen. Please help 🙏.

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

      Can you post your code? Any errors in the console?

  • @Natalia-sy8gs
    @Natalia-sy8gs 3 ปีที่แล้ว

    hello Conor, i using IPS ( invision community ). can i use this method in forum ? i must upload app.js in public_html ? andd how to add styles in temaplate ?

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

    hi, connor i like the video but i was wondering how you would change the background to an image instead

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

      Hey thanks for watching. Use the following css under .splash

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

      background: url(‘link to image here’);
      background-size: cover;
      background-position: center;

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

      @@ConorBailey that didnt work for some reasons

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

      Can you paste your css here?

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

    How can I add this to shopify?

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

    hello i tried to set intro by ites not done that way i need scrouce code
    if y dont mind can you give me a scrouce code

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

    the flash screen isn't going.
    js code:
    const splash = document.querySelector('.splash');
    document.addEventListener('DOMContentLoaded', (e)=>{
    setTimeout(()=>{
    splash.classList.add('display-none');
    }, 2000);
    })
    ----------------------------------------------
    I even put the script file at the end (before closing the body) but it still didn't work.
    Kindly revert asap.

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

      Mr. Nobody hey js looks good. Can you post your css for ‘display-none’?

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

      @@ConorBailey sure thing (thanks for the quick reply)
      --------------------------------------------------------------
      css code:
      .splash{
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100vh;
      background: black;
      z-index: 200;
      color: lightyellow;
      text-align: center;
      line-height: 90vh;
      font-family: helvetica;
      font-weight: 80;
      }
      @keyframes fadeIn{
      to{
      opacity: 1;
      }
      }
      .fade-in{
      opacity: 0;
      animation: fadeIn 1s ease-in forwards;
      }
      .splash.display-none{
      position: fixed;
      opacity: 0
      top: 0;
      left: 0;
      width: 100%;
      height: 100vh;
      background: black;
      z-index: -10;
      color: lightyellow;
      text-align: center;
      line-height: 90vh;
      transition: all 0.5s;
      }
      --------------------------------------------------------

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

      @@ConorBailey hey I rectified it, apparently I forgot to put a semicolon after opacity (in the css file)
      Thanks for this video!
      (subbed)

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

      Mr. Nobody nice one mate. Those pesky semi colons! 😂

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

    How could u do a video not a image or text?

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

    Hey can you share the source code. For me it's showing error

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

    Thank youuuu.

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

      Thanks for watching! 😁

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

      @@ConorBailey I have a multi screen html file I added the animations, they were working well but the links and buttons were not working. How can I fix this? Please tell.

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

    For some reason the text in white isn't coming for here, ps i am not too good at coding '. .
    ---

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

    why doesn't it go away?

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

    But what if instead of text or photo I will add a video on splash screen, Is it okay?

    • @ConorBailey
      @ConorBailey  3 ปีที่แล้ว +1

      yes that will work. just add a video tag or image tag to the splash screen div.

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

      Thank youuuu😊

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

      Can i have some more questions?😅

  • @M.ars03
    @M.ars03 4 ปีที่แล้ว

    exactly styles.css codes

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

    Anyone have the full source code?

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

    Hey bro. I'm having an error in javascript. It said classList is null. How to fix it? Thank you.

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

      Hi mate. Have you selected the element correctly. Are you using document.queryselector ?

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

      Yes bro. I created exactly in the video. Can you explain why i am having an error? A big help for me bro.

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

      @@jecsayno1339 sure paste your JavaScript here mate. I’ll take a look.

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

      @@ConorBailey
      JS:
      const splash = document.querySelector('.splash');
      document.addEventListener('DOMContentLoaded', (e)=>{
      setTimeout(()=>{
      splash.classList.add("display-none");
      }, 2000);
      })
      HTML:

      E-BRIDGE
      i'm having an error bro. even though i used your code exactly

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

      Hmm that’s really odd. Your code is working for me on code pen. Have you tried it on there?

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

    If it doesn't work, look closely at how he linked his css and it should work.

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

    Doesn't work. It just shows black screen

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

      It does work. Your code just has a bug in it.