Skip to main content

Car Website Design Using HTML , 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>page demo</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <link rel='stylesheet' type='text/css' media='screen' href='style2.css'>
  
</head>
<body>
    <div class="logo"><p id="logoT">CARO</p></div>
    <div class="cover">
<div class="maindiv">
    <nav id="nav">
       
        <ul class="nav-links">
            <li>
                <a href="#">new cars</a>
            </li>
            <li>
                <a href="#">used cars</a>
            </li>
            
        </ul>
    </nav>
    <div class="maintext">
        <p id="cartext">CAR0</p>
        <p>web design 2020</p>
        <p id="nor_text">
         Search secure for Cars For Sales Online. Search with Visymo.com. Results & Answers. Privacy Friendly. The Best Resources. Always Facts. 100% Secure. Unlimited Access. Services: Best Results, Explore Now, New Sources, Best in Search.
        </p><br>
        <button>buy now</button>
    </div>
    <div class="bigtext">
        <p id="p2">BUYING</p>
        <p id="p1">CAR</p>
                   </div>
                   <img src="img/cadillac_PNG15.png" alt="" class="img1">
              <img src="img/cadillac_PNG19.png" alt="" class="img2"></div>
              <img src="img/cadillac_PNG75.png" alt="" class="img3"></div>
</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='main2.js'></script>
</html>


CSS SOURCE_CODE:-

@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");


* {
    margin0;
    padding0;
    font-family"Poppins"sans-serif;
    box-sizingborder-box;
  }
  
  #nav {
    positionrelative;
  displayflex;
  justify-content:flex-end;
  align-itemscenter;
  height55px;
 
}

.nav-links {
    displayflex;
   
     width30%;
   }


   .nav-links li {
    list-style-typenone;
  }
  .nav-links a {
    padding30px;
  text-decorationnone;
  colorrgba(6978950.59);
  transition0.3s ease;
}

.nav-links a:hover {
    colorrgb(6063255);
  }

  .cover{
    overflowhidden;
   positionrelative;
   height100%;
   width100%;
  }
  
  .maindiv{
    background-color:rgb(248240240);
    height:100vh;
    width100vw;
    }
    
    .img1{
        positionabsolute;
        width50%;
        top15%;
        right8%;
    }
    .bigtext{
        positionabsolute;
        right42%;
        top10%;
        width100px;
        height500px;
    }
    .bigtext p{
        font-size100px;
        colorrgb(3636114);
        transformrotate(-90deg);
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans''Helvetica Neue'sans-serif
    }
    
    #p1{
        positionabsolute;
        top-10%;
        font-size100px;
        colorrgb(3636114);
    }
    
    #p2{
        positionabsolute;
        font-size100px;
        colorrgba(2102102110.74);
        right-10%;
    }
    
    .maintext{
        positionabsolute;
        top27%;
        left3%;
    }
    .maintext p{
        font-size50px;
font-familyArialHelveticasans-serif;
    }
    #cartext{
        font-size80px;
        colorrgb(393873);
        font-family:Verdana, Geneva, Tahomasans-serif;
    }
    
    #nor_text{
        width350px;
        font-size10px;
        colorrgba(1161161360.74);
    }
    button{
        padding15px 40px;
        background-colorrgb(6767161);
        bordernone;
        font-size15px;
        coloraliceblue;
        border-radius25px;
    }
    button:hover{
        background-colorrgb(4949255);
    }
    
    .logo{
        width7vw;
        height12vh;
        background-color:rgb(255255255);
        z-index100;
        font-familyArialHelveticasans-serif;
        positionabsolute;
        left3%;
    
    
        
    }
    #logoT{
        positionabsolute;
        colorrgb(8781255);
        font-size55px;
        top30%;
        left700px;
        opacity:0;
        
    }
    .img2{
        width100px;
        positionabsolute;
        top35%;
        right-1%;
    }
    
    .img3{
        width100px;
        positionabsolute;
        top35%;
        right-9%;
    }

Javascript (.js file) SOURCE_CODE:-

function page1() { 
    var tl = new TimelineMax()
    .to(".logo",0.8,{width:"100vw ",left: '0%',height:"100vh ",ease: Power2.easeOut},'close')
    .to("#logoT",1,{opacity: '0'},1,'close')
    .to("#logoT",1,{opacity: '1',fontSize:"55px",left:"600px",color:"rgba(116, 116, 136, 0.74)",ease: Power2.easeOut},2,'close')
    .to("#logoT",1,{opacity: '1',fontSize:"20px",left:"15%",top:"30%",color:" rgb(60, 63, 255)",ease: Power2.easeOut},3,'open')
    .to(".logo",1,{width:"6vw ",left: '3%',ease: Power2.easeOut},3,'open')
    .to(".logo",1,{height:"12vh ",ease: Power2.easeOut},4,'open')
    .from("#p1",1,{top:"-100%",ease: Power2.easeOut},6,'open')
    .from("#p2",1,{top:"-100%",ease: Power2.easeOut},5,'open')
    .from(".maintext",1,{left:"-50%",ease: Power2.easeOut},7,'open')
    .from(".img1",1,{right:"-50%",width:"0%",ease: Power2.easeOut},8,'open'
    .from(".img2",1,{right:"-50%",width:"0%",ease: Power2.easeOut},8,'open'
    .from("#nav",1,{top:"-100%",ease: Power2.easeOut},9,'open'


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






web design video My YOUTUBE channel











Comments

Popular posts from this blog

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" >      ...

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 = "#" >         ...