Skip to main content

How to create ui design e-commerce use gsap animation ?

 Create ui design e-commerce use gsap animation 





SOURCE CODE




HTML SOURCE_CODE:-

<!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'>
    <link rel='stylesheet' type='text/css' media='screen' href='style.css'>
    
</head>
<body>
    <div class="header">
        <a href="#">
          <img class="logo"   src="img/logo.png" alt="">
        </a>
        <div class="loc">
        <ul>
          <li><a href="#">PRODUCTS</a></li>
          <li><a href="#">SHOP</a></li>
          <li><a href="#">WATCHS</a></li>
          <li><a href="#">CONTACT</a></li>
          
        </ul>
        
       <div><a href="#"><img class="icon"src="img/icon1.png" alt=""></a></div>
       <div class="log1">1</div>   
       <div class="log"><img src="img/Untitled-1.png" alt=""></div> 
        </div>
      </div>
    
    <div class="conta">
        <div class="watchs">
        <img class="w1" src="img/w1.png" alt="">
        <img class="w2" src="img/w2.png" alt="">
        <img class="w3" src="img/w3.png" alt="">
    </div>
<div class="con1">
    <div class="con1-1">
        <div class="craro"></div>
        <img class="wh" id="wh1" src="img/w1.png" alt="">
        <img class="wh" id="wh2" src="img/w2.png" alt="">
        <img class="wh" id="wh3" src="img/w3.png" alt=""></div>
</div>
<div class="con2">
    <img src="img/backi.png" alt="">
    <div class="cover">
    <div class="text" id="t1">
        <p class="tex1">GET FIT IN STYLE</p><br>
        <p class="tex2">GET FIT IN STYLE GET FIT IN STYLE GET FIT IN STYLE 
            GET FIT IN STYLEGET FIT IN STYLEGET FIT IN STYLE
            GET FIT IN STYLEGET FIT IN STYLE.GET FIT IN STYLEGET FIT IN STYLEGET FIT IN STYLE
            GET FIT IN STYLEGET FIT IN STYLE.
        </p>
        <br>
      
<div class="cer">
        <span class="c1">i</span>
        <span class="c2">L</span>
        <span class="c3">S</span></div>
        <div class="tex3">$99.56</div>  

        <div class="button" id="butt">
            BUY NOW
        </div>
    </div>
    <div class="text" id="t2">
        <p class="tex1">GET FIT IN STYLE</p><br>
        <p class="tex2">GET FIT IN STYLE GET FIT IN STYLE GET FIT IN STYLE 
            GET FIT IN STYLEGET FIT IN STYLEGET FIT IN STYLE
            GET FIT IN STYLEGET FIT IN STYLE.GET FIT IN STYLEGET FIT IN STYLEGET FIT IN STYLE
            GET FIT IN STYLEGET FIT IN STYLE.
        </p>
        <br>
      
<div class="cer">
        <span class="c1">i</span>
        <span class="c2">L</span>
        <span class="c3">S</span></div>
        <div class="tex3">$79.56</div>  

        <div class="button" id="butt">
            BUY NOW
        </div>
    </div>  
    <div class="text" id="t3">
        <p class="tex1">GET FIT IN STYLE</p><br>
        <p class="tex2">GET FIT IN STYLE GET FIT IN STYLE GET FIT IN STYLE 
            GET FIT IN STYLEGET FIT IN STYLEGET FIT IN STYLE
            GET FIT IN STYLEGET FIT IN STYLE.GET FIT IN STYLEGET FIT IN STYLEGET FIT IN STYLE
            GET FIT IN STYLEGET FIT IN STYLE.
        </p>
        <br>
      
<div class="cer">
        <span class="c1">i</span>
        <span class="c2">L</span>
        <span class="c3">S</span></div>
        <div class="tex3">$89.56</div>  

        <div class="button" id="butt">
            BUY NOW
        </div>
    </div>
</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='main.js'></script>
</html>

                                

CSS SOURCE_CODE:-

*{
    padding0;
    margin0;
    box-sizingborder-box;
}
.conta{
displayflex;
justify-contentcenter;
align-itemscenter;
}
.con1{
  
    width550px;
    height100vh;
    background-colorrgb(363434);
}
.con2{
  overflowhidden;
    width850px;
    height100vh;
    background:linear-gradient(to bottom,#20ba72 0%#00ade0 100%);
}

 .con1-1{
  
    width:80px;
    height100vh;
    background-colorrgb(255255255);  
}
.con2 img{
    positionabsolute;
    width570px;
    left700px;
    top10%;
    displayflex;
    justify-contentcenter;
    align-itemscenter;
    opacity0.5;
}
.conta .watchs{
    positionabsolute;
    height500px;
    width300px;
    displayinline-block;
    overflowhidden;
    top10%;
    left26%;
    
  
}
.conta .w1{
    positionrelative;
    z-index10;
    height450px;
    left0%;
}
.conta .w2{
    positionrelative;
    z-index10;
    height450px;
    left0%;
}
.conta .w3{
    positionrelative;
    z-index10;
    height450px;
    left0%;
}

.craro{
    positionabsolute;
  height15%;
    width6%;
    top16%;
    opacity0.3;
    background-color:#0159fd ;
    z-index100;
   
}
.craro:before{
    content'';
    positionabsolute;
    height100%;
    width90%;

   
    background-colorrgb(1262520);
}
.conta .con1 .con1-1 #wh1{
    positionabsolute;
    z-index10;
    height:15%;
    top400px;
    left8px;
}
.conta .con1 .con1-1 #wh2{
    positionabsolute;
    z-index10;
    height:15%;
    top250px;
    left8px;
   
}

.conta .con1 .con1-1 #wh3{
    positionabsolute;
    z-index10;
    height:15%;
    top100px;
    left8px;

}
.cover{
    positionrelative;
    top20%;
   
}
.text{
    positionabsolute;
    colorblanchedalmond;
    top20%;
    left20%;
   overflowhidden;
    width500px;
    height500px;
  displayinline-block;
    letter-spacing1px;
    
}
.text .tex1{
    positionrelative;
    font-size50px;
    font-familysans-serif;
}
.text .tex2{
    positionrelative;
    font-size12px;
    font-familysans-serif;
   
   
}
.text span{
    positionabsolute;
    displayinline-block;
    bordersolid 2px #ffffff;
    align-itemscenter;
    justify-contentcenter;
    padding:5px 8px;
    width30px;
    height30px;
    border-radius50%;
   top170px;
   transition.5s;
  cursorpointer;
  
}

.text .c1{
    left2%;
    padding:5px 10px;
}
.text .c1:hover{
    padding:5px 12px;
}
.text .c2{
    left10%;
}
.text .c3{
    left18%;
}
.text .cer{
    margin0 5px;
}
.text span:hover{
    width33px;
    height33px;
    bordersolid 2px #c3f61c;
    padding:5px 10px;
    font-size18px;
}

.text .tex3{
    positionrelative;
    font-size45px;
    font-familysans-serif;
   top90px
}
 
.text .button{
    positionabsolute;;
    padding15px 26px;
    background-colorrgb(404041);
   transition0.5s;
    top350px;
    left10px;
    font-size13px;
    font-familysans-serif;
    cursorpointer;
    border-radius25px;
}
 
.text .button:hover{
    box-shadow0 10px 9px  #000 ;
    top348px;
    border-radius25px;
    background-colorrgb(000);
    color#e4f00b;
}
.text .button:active{
    box-shadow0 0px 9px  #000 ;
    top348px;
}
.header{
    positionabsolute;;
    top0;
    left0;
    width100%;
    padding:10px 100px;
    displayflex;
    justify-content:space-between;
    align-itemscenter;
    z-index400;
  
  }
  .logo{
    positionrelative;
    max-width60px;
   transition0.4s;

   left-90px;
  }
 
  .header ul{
    positionrelative;
    displayflex;
  }
  .header ul li{
    list-stylenone;
  }
  .header ul li a{
  displayinline-block;
  colorrgb(255255255);
  font-weight400;
  margin-left40px;
  text-decorationnone;
  font-size12px;
  font-familysans-serif;
  transition.5s;
  }
  .header ul li a:hover{
    
    colorrgb(23321818);
   
    }
    .header .log img{
        positionrelative;
        left50px;
        height40px;
        width40px;
        background-colorivory;
        border-radius50%;
    }
    .header .log1{
        positionabsolute;
        right:120px;
        top18px;
        padding2px 5px;
        height20px;
        width20px;
        background-colorrgb(25500);
        border-radius50%;
        color#ffffff;
     visibilityhidden;
     font-familysans-serif;
    }
    .header .loc{
        displayflex;
        justify-content:center;
        align-itemscenter;
    }
  .icon{
      positionrelative;
      height40px;
      left20px;
  }
  


Javascript (.js file) SOURCE_CODE:-






$(".wh").click(function() {
    $('.container').attr("color-center"this.id);
    if (this.id == "wh1"watch1();
    if (this.id == "wh2"watch2();
    if (this.id == "wh3"watch3();
   
   
 
 });



 function watch1() { 
    var tl = new TimelineMax()
    .to(".w1",0.8,{yPercent:0},0)
    .to(".w2",0.8,{yPercent:100},0)
    .to(".w3",0.8,{yPercent:100},0)
    .to("#t1",0.8,{xPercent:0},0)
    .to("#t2",0.8,{xPercent:-500},0)
    .to("#t3",0.8,{xPercent:-500},0)
    .to(".craro",0.8,{yPercent:320},0)

 }
 
 function watch2() {
    var tl = new TimelineMax()
    .to(".w1",0.8,{yPercent:200},0)
    .to(".w2",0.8,{yPercent:-100},0)
    .to(".w3",0.8,{yPercent:200},0)
    .to("#t1",0.8,{xPercent:-500},0)
    .to("#t2",0.8,{xPercent:0},0)
    .to("#t3",0.8,{xPercent:-500},0)
    .to(".craro",0.8,{yPercent:160},0)
 }
 
 function watch3() {
    var tl = new TimelineMax()
    .to(".w1",0.8,{yPercent:200},0)
    .to(".w2",0.8,{yPercent:200},0)
    .to(".w3",0.8,{yPercent:-200},0)
    .to("#t1",0.8,{xPercent:-500},0)
    .to("#t2",0.8,{xPercent:-500},0)
    .to("#t3",0.8,{xPercent:0},0)
    .to(".craro",0.8,{yPercent:0},0)
 }
 
 

   

 $(function() {
    watch1();
 })

 $(".button").click(function() {
   $('.container').attr("color-center"this.id);
   if (this.id == "butt"icon1();
   
  
  

});
function icon1() {
   var tl = new TimelineMax()
   .from(".icon",0.5,{rotation:320,xPercent:-50    },0)
   .to(".log1",0.5,{yPercent:10 , visibility: "visible"},0)
}


web design video





















Comments

Popular posts from this blog

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

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

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