Skip to main content

Create A Pizza Website Using HTML And CSS and GSAP| Page transition animation by gsap. Artspider


https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/gsap.min.js



SOURCE CODE




HTML SOURCE_CODE:-
index .html

👇

<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>home page transion</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <link rel='stylesheet' type='text/css' media='screen' href='main.css'>
    
</head>
<body >
   
    <div class="cover">
        <img src="img/logo.png" alt="" class="logo">
       <div class="loader"></div>
    <div class="up_div">
       
    </div>
   
    <div class="lo_div"></div>
    <div class="maindiv">
        <div class="header" id="hd">
           
            <div class="loc">
            <ul>
              <li><a href="index.html"  class="butt">Home</a></li>
              <li><a href="about.html" class="butt">about</a></li>
              
             
              
            </ul>
          
          </div>
        </div>
        <a href="index.html">
            <img src="img/logo.png" alt="" class="logo2">
        </a>
        <div class="topi">
            <img src="img/28212924.png" alt="" class="tomato tom1">
            <img src="img/28212924.png" alt="" class="tomato tom2">
            <img src="img/clipart1068857.png" alt="" class="mus mu1">
            <img src="img/clipart1068857.png" alt="" class="mus mu2">
            <img src="img/onion-22153.png" alt="" class="onion oni1">
            <img src="img/onion-22153.png" alt="" class="onion oni2">
           
        </div>
        <div class="text">
            <h2> MAD pizza</h2>
            <p>Pizza buffalo wing chicken
             tikka shawarma italian pizza</p><br>
            <button>buy now</button></div>
<div class="bak1"></div>
<div class="bak2"></div>
<div class="bak3">
    <div class="inbak1 in"><img src="img/kisspng-hamburger-sushi-california-style-pizza-sicilian-pi-pizza-5a7934a49e7189.498662081517892772649.png" alt="" class="img2"></div>
    <div class="inbak2 in"><img src="img/kisspng-pizza-buffalo-wing-chicken-tikka-shawarma-italian-pizza-5ab4e8fd3a3848.5478652615218055652385 (1).png" alt="" class="img3"></div>
    <div class="inbak3 in"><img src="img/kisspng-sicilian-pizza-fajita-shawarma-fast-food-pizza-5acf77ee6f16b6.627157011523546094455.png" alt="" class="img4"></div>
</div>
<img src="img/kisspng-pizza-buffalo-wing-chicken-tikka-shawarma-italian-pizza-5ab4e8fd3a3848.5478652615218055652385 (1).png" alt="" class="img1">
    </div>

</div>


</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.0/gsap.min.js" integrity="sha512-JO6JyFPJupQKZf7icgZkHwuq/rAQxH7COqvEd4WdK52AtHPedwHog05T69pIelI69jVN/zZbW6TuHfH2mS8j/Q==" crossorigin="anonymous"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.0/CSSRulePlugin.min.js'></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.0/EaselPlugin.min.js"></script>
<script src='main.js'></script>
</html>

about.html

👇

<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>about page</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <link rel='stylesheet' type='text/css' media='screen' href='main.css'>
    
</head>
<body >
   
    <div class="cover">
        <img src="img/logo.png" alt="" class="logo">
       <div class="loader"></div>
    <div class="up_div"></div>
   
    <div class="lo_div"></div>
    <div class="maindiv2">
        <div class="header" id="hd2">
           
            <div class="loc">
            <ul>
              <li><a href="index.html"  class="butt">Home</a></li>
              <li><a href="about.html"  class="butt">about</a></li>
              
             
              
            </ul>
          
          </div>
        </div>
        <div class="about">
          <p class="about_text">about</p>
          
                </div>
        <a href="index.html">
            <img src="img/logo.png" alt="" class="logo3">
        </a>
        <div class="topi">
          <img src="img/28212924.png" alt="" class="tomato tom1">
          <img src="img/28212924.png" alt="" class="tomato tom2">
          <img src="img/clipart1068857.png" alt="" class="mus mu1">
          <img src="img/clipart1068857.png" alt="" class="mus mu2">
          <img src="img/onion-22153.png" alt="" class="onion oni1">
          <img src="img/onion-22153.png" alt="" class="onion oni2">
         
      </div>
        <div class="text2 ">
          <h2> MAD pizza</h2>
          <p>Best Pizza in Kolkata, Kolkata District: Find Tripadvisor traveller reviews of Kolkata Pizza places and search by price, ... “Awasome place for pizza lovers!!!”.
            Best Pizza in Kolkata, Kolkata District: Find Tripadvisor traveller reviews of Kolkata Pizza places and search by price, ... “Awasome place for pizza lovers!!!”.
            Best Pizza in Kolkata, Kolkata District: Find Tripadvisor traveller reviews of Kolkata Pizza places and search by price, ... “Awasome place for pizza lovers!!!”.
            Best Pizza in Kolkata, Kolkata District: Find Tripadvisor traveller reviews of Kolkata Pizza places and search by price, ... “Awasome place for pizza lovers!!!”.Best Pizza in Kolkata, Kolkata District: Find Tripadvisor traveller reviews of Kolkata Pizza places and search by price, ... “Awasome place for pizza lovers!!!”.

          </p></div>
          
          <img src="img/res.jfif" alt="" class="img5">
         </div></div>
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.0/gsap.min.js" integrity="sha512-JO6JyFPJupQKZf7icgZkHwuq/rAQxH7COqvEd4WdK52AtHPedwHog05T69pIelI69jVN/zZbW6TuHfH2mS8j/Q==" crossorigin="anonymous"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.0/CSSRulePlugin.min.js'></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.0/EaselPlugin.min.js"></script>
<script src='main.js'></script>
</html>



CSS SOURCE_CODE:-



*{
    padding0;
    margin0;
    box-sizingborder-box;
}
.header{
    positionabsolute;
    top-20%;
    left3%;
 width100%;
    padding:10px 100px;
   
    z-index40;
    background-color:transparent;
    
   
  
  }
 
 
  .header ul{
    positionrelative;
    displayflex;
  }
  .header ul li{
    list-stylenone;
  }
  .header ul li a{
  displayinline-block;
  colorrgb(14899);
  font-weight400;
  margin-left40px;
  text-decorationnone;
  font-size15px;
  font-familysans-serif;
  transition.5s;

  }
  .header ul li a:hover{
    
    colorrgb(23316415);
   
    }
.cover{
  overflowhidden;
 positionrelative;
 height100%;
 width100%;
}
.maindiv{
background-color:rgb(248240240);
height:100vh;
width100vw;
}

.up_div{
    positionabsolute;
    background-colorrgb(240236231);
    height:50vh;
    top-500px;
width100vw;
z-index50;
}
.lo_div{
    positionabsolute;
    background-color:rgb(223219215);
    height:50vh;
    bottom-500px;
width100vw;
z-index50;
}

.loader{
positionabsolute;
height4px ;
width0vw;
top50%;

border-radius25px;
background-colorrgb(25500);
z-index60;
}

.logo{
    positionabsolute;
    height180px;
    width150px;
    top-20%;
    left:43%;
    z-index10;
    opacity0;
    z-index60;
}
.logo2{
    positionabsolute;
    height90px;
    width70px;
    top-20%;
    left:4%;
    opacity0;
    z-index50;
   
}
.bak1{
    positionabsolute;
    width0vw;
    height100vh;
    background-colorrgb(241216160);
    
}
.bak2{
    positionabsolute;
    width0vw;
    height100vh;
    background-colorrgb(255510);
  right0;
}
.bak3{
    positionabsolute;
    width40vw;
    height30vh;
    background-colorrgb(25117861);
left0;
bottom-200px;
border-radius0px 40px 0px 0px;
z-index30;
}
.img1{
    z-index2;
    positionabsolute;
    height500px;
    width500px;
    right-100%;
    top50px;
    opacity0;
}

  

.in img{
    positionabsolute;
    height150px;
    width150px;
    top15%;
   
   
}
.inbak1 img {
left6%;
height140px;
    width140px;
    top18%;
}
.inbak2 img{
    left38%;   
}
.inbak3 img{
    left70%;
}

.text{
    positionabsolute;
    z-index30;
    width450px;
    top60%;
    left10%;
    opacity0;
}

.text p{
   font-size30px;
font-family'Gill Sans''Gill Sans MT', Calibri, 'Trebuchet MS'sans-serif;
top:50%;
color:rgb(2551660);
}
.text h2{
    font-size70px;
 color:rgb(2535757);
    font-family:Segoe Print;
 }
 
 .text button{
     padding12px 50px;
     background-colorrgb(2353535);
     bordernone;
      colorfloralwhite;
      border-radius25px;
      transition.5s;

 }
 .text button:hover{
    padding12px 50px;
    background-colorrgb(24317241);
    bordernone;
     colorrgb(000);
     border-radius25px;

}
 .tomato{
     width80px;
     height80px;
     positionabsolute;
     z-index30;
     opacity0;
    
 }
 .tom1{
    right50%;
    top20%;
   
 }
 .tom2{
    right20%;
    top90%;
    width90px;
     height90px;

 }

 .mus{
    width80px;
    height80px;
    positionabsolute;
    z-index30;
    opacity0;
    
}
.mu1{
    right20%;
    top0%;
   
}
.mu2{
    right45%;
    top90%;
   width60px;
   height60px;
  
}
.onion{
    width80px;
    height80px;
    positionabsolute;
    z-index1
    opacity0
}
.oni1{
    right90%;
    top15%
   
}
.oni2{
    right50%;
    top60%
    width110px;
    height:100px;
}


.about{
    top-20%;
left30%;
    width500px;
    height100px;
    font-family'Gill Sans''Gill Sans MT', Calibri, 'Trebuchet MS'sans-serif;
    positionabsolute;
    displayflex;
    justify-contentcenter;
    align-itemscenter;
    font-size50px;
    text-transformuppercase;
    -webkit-text-stroke2px rgb(24617131);
 
    -webkit-text-fill-colortransparent;
    
    colortransparent;

  }
  .about_text{
opacity1;
  }



.maindiv2{
    background-colorrgb(248240240);
    height:100vh;
    width100vw;
    }

    .logo3{
        positionabsolute;
        height90px;
        width70px;
        top-20%;
        left:4%;
        opacity0;
        z-index50;
       
    }
.text2{
    positionabsolute;
    z-index30;
    width500px;
    top60%;
    left10%;
    opacity0;
}
.text2 p{
    font-size20px;
 font-family'Gill Sans''Gill Sans MT', Calibri, 'Trebuchet MS'sans-serif;
 top:50%;
 color:rgb(2551660);
 }

 .text2 h2{
    font-size70px;
 color:rgb(2535757);
    font-family:Segoe Print;
 }
 .img5{
     positionabsolute;
 
     z-index2;
border-radius25px;
    height300px;
    width400px;
    right-70%;
    top30%;
    opacity0;
 }


Javascript (.js file) SOURCE_CODE:-






 function page1() { 
    var tl = new TimelineMax()
    .to(".up_div",0.5,{top: '0%',ease: Power2.easeOut},'close',)
    .to(".lo_div",0.5,{bottom: '0%',ease: Power2.easeOut},'close',)
    .to($(".logo"),2,{ opacity: 1 ,top: '20%',  height:'180px',width:'150px'ease: Power2.easeOut},'close',1)
    .to($('.loader'), 5.2, {opacity: 1 ,width:'100vw'})
    .to($('.loader'), -10, {opacity: 0},'-=0',)
    .to($(".logo"),2,{ opacity: 0,top: '-20%',  height:'110px',width:'90px'left:'43%',ease: Power2.easeOut},'open',1)
    .to(".up_div",3,{top: '-80%',ease: Power2.easeOut,  },'open',)
    .to(".lo_div",3,{bottom: '-80%',ease: Power2.easeOut, },'open',)
  

    .to(".bak1",1,{ opacity: 1 ,width: '70vw'},8,)
    .to(".bak2",1,{ opacity: 1 ,width: '30vw'},9,)
    
    .to(".tomato",1,{ opacity: 0.5 ,},10,)
    .to(".mus",1,{ opacity: .5 ,},11,)
    .to(".onion",1,{ opacity: .5 ,},12,)
    .to(".logo2",3,{ opacity: 1 ,top: '0%'ease: Power2.easeOut},13,)
    .to(".logo3",3,{ opacity: 1 ,top: '0%'ease: Power2.easeOut},8,)
    .to("#hd",3,{ opacity: 1 ,top: '5%'ease: Power2.easeOut},13,)
    .to("#hd2",3,{ opacity: 1 ,top: '5%'ease: Power2.easeOut},8,)
    .to(".about",3,{ opacity: 1 ,top: '5%'ease: Power2.easeOut},9,)
    .to(".text",1.2,{ opacity: 1 ,top: '20%'ease: Power2.easeOut},14,)
    .to(".text2",1.2,{ opacity: 1 ,top: '20%'ease: Power2.easeOut},12,)
    .to(".img1",2,{ opacity: 1 ,right: '10%',  ease: "back.inOut(1.7)"rotate:'360deg'},14,)
    .to(".img5",2,{ opacity: 1 ,right: '10%'ease: "back.inOut(1.7)"rotate:'360deg'},13,)
    .to(".bak3",1.2,{ opacity: 1 ,bottom:'0'ease: Power2.easeOut},16,)
 }
 
 
 
 

   

 $(function() {
  page1();
 })

web design video My YOUTUBE channel





Comments

Popular posts from this blog

How To Make A Website Using HTML CSS & Bootstrap | Personal Portfolio Website Design Tutorial

How To Make A Website Using HTML CSS & Bootstrap | Personal Portfolio Website Design Tutorial SOURCE CODE HTML  SOURCE_CODE:- index .html 👇 <!DOCTYPE html> <html> <head>     <meta charset='utf-8'>     <meta http-equiv='X-UA-Compatible' content='IE=edge'>     <title>Page Title</title>     <meta name='viewport' content='width=device-width, initial-scale=1'>     <!-- Google Fonts -->   <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">   <!-- Vendor CSS Files -->   <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">   <link href="assets/vendor/icofont/icofont.min.css" rel="stylesheet">   <link href="assets/v...

How to create Page transition animation by Greensock (gsap)?

 Create Page transition animation by Greensock (gsap) https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/gsap.min.js SOURCE CODE HTML  SOURCE_CODE:- index .html 👇 <! DOCTYPE   html > < html > < head >      < meta   charset = 'utf-8' >      < meta   http-equiv = 'X-UA-Compatible'   content = 'IE=edge' >      < title >  index Page  </ title >      < meta   name = 'viewport'   content = 'width=device-width, initial-scale=1' >      < link   rel = 'stylesheet'   type = 'text/css'   media = 'screen'   href = 'main.css' >      </ head > < body >      < div   class = "header" >          < a   href = "#" >         ...