Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="group group-three">
  <div class="group--container">
    
    <div class="group--title" data-aos="zoom-out-up" data-aos-offset="500">
      <h2>Air Max Premium</h2>
      <div class="group--subtitle">
         If the Shoe Fits Hover It. 
      <!--  If the Shoe Fits Card UI Experiment -->
      </div>
    </div>
    
    <div class="card--style2 card--one" data-aos="fade-up">
      
      <div class="shoe--info">
        <span class="shoe--name">
            NIKE AIR MAX PREMIUM
        </span>
        <span class="shoe--price">
          $150
        </span>
      </div> 
      
      <div class="shoe">
        <img src="https://bit.ly/2lTBReR" alt="nike air max premium red" />
      </div>
      
       <div class="shoe--colors">
          
          <ul class="colors">
            <li data-color="#F5624D"></li>
            <li data-color="#CC231E" class="active-color" ></li>
            <li data-color="#34A65F"></li>
          </ul>
        
        </div>
  
    </div>
    
     <div class="card--style2 card--two" data-aos="fade-up">
      
      <div class="shoe--info">
        <span class="shoe--name">
            NIKE AIR MAX ESSENTIAL
        </span>
        <span class="shoe--price">
          $150
        </span>
      </div> 
      
      <div class="shoe">
          <img src="https://bit.ly/2kRrQxP" alt="nike air max essential black" />
      </div>
       
      
       <div class="shoe--colors">
          
          <ul class="colors">
            <li data-color="#F5624D"></li>
            <li data-color="#CC231E" class="active-color" ></li>
            <li data-color="#34A65F"></li>
          </ul>
        
        </div>
  
    </div>
    
    <div class="card--style2 card--three" data-aos="fade-up">
      
      <div class="shoe--info">
        <span class="shoe--name">
            NIKE AIR MAX 90
        </span>
        <span class="shoe--price">
          $150
        </span>
      </div> 
      
      <div class="shoe">
        <img src="https://bit.ly/2kRsdIN" alt="nike air max 90" />
      </div>
      
         <div class="shoe--colors">
          
          <ul class="colors">
            <li data-color="#F5624D"></li>
            <li data-color="#CC231E" class="active-color" ></li>
            <li data-color="#34A65F"></li>
          </ul>
        
        </div>
  
    </div>
    
    <div class="shop-all">
      <button class="button">shop collection</button>
    </div>
    
  </div>
</div>


<!-- Current 2nd Group -->
<div class="group group-one">
  <div class="group--container">
    
    <div class="group--title" data-aos="fade-up">
      <h2>Air Max Premium</h2>
      <div class="group--subtitle">
        A sample card UI layout.
      </div>
    </div>
    
    <div class="card card--one">
      
      <div class="shoe">
        <img src="https://bit.ly/2lTBReR" alt="nike air max premium red" />
      </div>
      
      <div class="shoe--colors">
          
          <ul class="colors">
            <li data-color="#F5624D"></li>
            <li data-color="#CC231E" class="active-color" ></li>
            <li data-color="#34A65F"></li>
          </ul>
        
          <button class="buy-btn">Add to Cart</button>
        </div>
      
      <div class="shoe--info">
        <span class="shoe--name">NIKE AIR MAX PREMIUM</span>
        <span class="shoe--price"> $150 </span>
      </div> 
    </div>
    
    <div class="card card--two" >
      
      <div class="shoe"  >
        <img src="https://bit.ly/2kRrQxP" alt="nike air max essential black" />
      </div>
      
      <div class="shoe--colors">
          
          <ul class="colors">
            <li data-color="#F5624D"></li>
            <li data-color="#CC231E" class="active-color" ></li>
            <li data-color="#34A65F"></li>
          </ul>
        
          <button class="buy-btn">Add to Cart</button>
        </div>
      
      <div class="shoe--info">
        <span class="shoe--name">NIKE AIR MAX PREMIUM</span>
        <span class="shoe--price"> $150 </span>
      </div> 
    </div>
    
    <div class="card" >
      
      <div class="shoe"  >
        <img src="https://bit.ly/2kRsdIN" alt="nike air max 90 blue and black" />
      </div>
      
      <div class="shoe--colors">
          
          <ul class="colors">
            <li data-color="#F5624D"></li>
            <li data-color="#CC231E" class="active-color" ></li>
            <li data-color="#34A65F"></li>
          </ul>
        
          <button class="buy-btn">Add to Cart</button>
        </div>
      
      <div class="shoe--info">
        <span class="shoe--name">NIKE AIR MAX PREMIUM</span>
        <span class="shoe--price"> $150 </span>
      </div> 
    </div>
    
  </div>
</div>

<div class="group group-two">
  <div class="group--container">
    
    <div class="group--title">
      <h2>Air Max Premium</h2>
      <div class="group--subtitle">
        A sample card UI layout.
      </div>
    </div>
   
 <div class="card card--one" data-aos="fade-right">
      
      <div class="shoe">
        <img src="https://bit.ly/2lTBReR" alt="nike air max premium red" />
      </div>
      
      <div class="shoe--colors">
          
          <ul class="colors">
            <li data-color="#F5624D"></li>
            <li data-color="#CC231E" class="active-color" ></li>
            <li data-color="#34A65F"></li>
          </ul>
        
          <button class="buy-btn">Add to Cart</button>
        </div>
      
      <div class="shoe--info">
        <span class="shoe--name">NIKE AIR MAX PREMIUM</span>
        <span class="shoe--price"> $150 </span>
      </div> 
    </div>
    
    <div class="card card--two" data-aos="zoom-out">
      
      <div class="shoe"  >
        <img src="https://bit.ly/2kRrQxP" alt="nike air max premium red" />
      </div>
      
      <div class="shoe--colors">
          
          <ul class="colors">
            <li data-color="#F5624D"></li>
            <li data-color="#CC231E" class="active-color" ></li>
            <li data-color="#34A65F"></li>
          </ul>
        
          <button class="buy-btn">Add to Cart</button>
        </div>
      
      <div class="shoe--info">
        <span class="shoe--name">NIKE AIR MAX PREMIUM</span>
        <span class="shoe--price"> $150 </span>
      </div> 
    </div>
    
    <div class="card" data-aos="fade-left">
      <div class="shoe">
        <img src="https://bit.ly/2kRsdIN" alt="nike air max 90" />
        <div class="shoe--colors">
          <ul class="colors">
            <li data-color="#F5624D"></li>
            <li data-color="#CC231E" class="active-color" ></li>
            <li data-color="#34A65F"></li>
          </ul>
          <button class="buy-btn">Add to Cart</button>
        </div>

         <div class="shoe--info">
        <span class="shoe--name">NIKE AIR MAX PREMIUM</span>
        <span class="shoe--price"> $150 </span>
      </div> 
      
      </div>
    </div>
    
  </div>
</div>
              
            
!

CSS

              
                @import "bourbon" ;
@import "neat" ;

//codepen.io/jakob-e/pen/woGXWe.scss
@include google-font {
  @include google-font(Roboto, 300 400 500 700 900);      
}

// $pattern1: https://bit.ly/2lpyqPh ;


.color1 {
  background-color: #d33f4b ;
}
.color2{
  background-color: #545151;
}
.color3{
  background-color: #5695c3;
}
.color4{
  background-color: #0F8A5F;
}
.color5{
  background-color: #235E6F;
}


// global 

.shoe--name {
  font-family: "Roboto", sans-serif ;
  font-weight: 600 ;
  display: flex ;
  flex-direction: column ;
}

.shoe--price {
  color: #949494 ;
}

.group {
  min-height: 760px ;
  height: 100vh ;
  display: flex ;
  align-items: center ;
  background-image: url(https://bit.ly/2lpu3Uh);
  background-blend-mode: multiply; 
  
  
  .group--container {
    max-width: 1200px ;
    margin: 0 auto ;
    padding: 0 0 60px 0 ;
    display: flex ;
    flex-wrap: wrap ;
    justify-content: space-around ;
  }
  
  .group--title {
    display: flex ;
    flex-direction: column ;
    align-items: center ;
    justify-content: center ;
    width: 100% ;
    text-transform: uppercase ;
    margin-bottom: 100px ;
    
    h1, h2, h3, h4 {
      font-family: 'Roboto' ;
      font-weight: 700 ;
      font-family: Futura, Futura-Medium, "Futura Medium", "Century Gothic", CenturyGothic, "Apple Gothic", AppleGothic, "URW Gothic L", "Avant Garde", sans-serif;
      font-size: 32px ;
      margin: 0 0 10px 0 ;
      
      &:before {
        content: '';
        display: block ;
        border-top: 4px solid #232323 ;
        padding-top: 18px ;
        width: 43% ;
        margin: 0 auto ;
      }
    }
  }
  .group--subtitle {
    font-weight: 400 ;
    font-family: "Roboto", sans-serif ;
    color: #777 ;
    letter-spacing: 0.6px ;
  }
}



.card {
  width: 315px ;
  height: 400px ;
  background: #fff ;
  margin: 0 15px ;
  padding: 60px 33px 12px 33px ;
  box-sizing: border-box ;
  box-shadow: 1px 2px 2px rgba(0, 0, 0, .04);
  border-radius: 2px ;
  position: relative ;
  display:block ;
  
  
  .shoe {
    img {
      max-width: 100% ;
      width: 250px ;
      margin-bottom: 120px ;
      position: relative ;
      // will-change: transform ;
      // transform: translateZ(20px) ;
    }
  }
  
  .shoe--info {
    position: absolute ;
    bottom: -70px ;
    text-align: center ;
    width: 100% ;
    left: 0 ;

    
    .shoe--name {
      margin-bottom: 8px ;
    }
    .shoe--price {
      font-weight: 400 ;
      color: #757575 ;
      font-size: 14px ;
    }
  }
  
  .shoe--colors {
    padding: 23px 0 0 0 ;
    border-top: 1px solid #f4f4f5 ;
    bottom: 40px ;
    display: flex ;
    align-items: center ;
    justify-content: space-between ;
    // width: 100% ;
    margin: 0 ;
    // padding: 0 ;
  }
  
}



// ul
.colors{
  margin: 0 ;
  padding: 0 ;
  width: 100% ;
  display: flex ;
  justify-content: flex-start ;
  
	
	>li{
		list-style: none;
		width: 20px;
		height: 20px;
		border-radius: 50%;
		display: inline-block;
		// margin: 0 8px 0 0;
    margin: 0 4px ;
    box-sizing: border-box ;
		cursor: pointer;
		transition-duration: .2s;
		// box-shadow: 0 2px 1px rgba(0, 0, 0, .1);
    // border: 2px solid rgba(#fff, .2) ;
    transition: all ease 1s;
    
		
		&:hover{
			transform: scale(1.09);
      transition: all ease 1s;
		}
		
		&.active-color{
		}
		
		&:nth-child(1){
      @extend .color1 ;
		}
		&:nth-child(2){
			@extend .color2 ;
		}
		&:nth-child(3){
			@extend .color3 ;
		}
		&:nth-child(4){
			@extend .color4 ;
		}
		&:nth-child(5){
			@extend .color5 ;
		}
	}
}

.buy-btn {
  width: 100% ;
  display: flex ;
  align-items: center ;
  justify-content: center ;
  font-size: 14px ;
  outline: 0 ;
  background-color: transparent ;
  box-shadow: none ;
  border: 2px solid #afafaf ;
  text-transform: uppercase ;
  padding: 8px 19px ;
  // line-height: .8;
  display: flex ;
  align-items: center ;
  border-radius: 3px ;
  font-weight: 400 ;
  font-family: "Roboto", sans-serif ;
  color: #afafaf ;
}

.card--style2 {
    width: 330px ; 
    height: 360px ;
    padding: 0 ;
    position: relative ;
  // background: orange ;
  padding-bottom: 80px ;
  box-sizing: border-box ;
  
  .shoe {
    // background: purple ;
    // height: 300px ;
    // width: 100% ;
    padding-bottom: 50px ;
    position: absolute ;
    bottom: 0 ;
     will-change: transform ;
    transform-origin: center center ;
    transform: scale(1) ;
    transition: all .5s ease ;
  
    &:before {
      content: '' ;
      display: block;
      background: #fff ;
      height: 310px ;
      width: 200px ;
      position: absolute ;
      bottom: 50px ;
      left: 90px ; 
    }
    
    img {
      // width: 100% ;
      width: 100% ;
      // margin-bottom: 120px ;
      position: relative ;
      // will-change: transform ;
      // transform: translateZ(20px) ;
    }
  
  }
  
  .shoe--info {
    position: relative ;
    left: 24px ;
    // right: 0px ;
    top: 60px ;
    z-index: 20 ;
    will-change: transform ;
    transform: scale(1) ;
    transition: all .4s ease ;
    transform-origin: center center ;
  }
  
  .shoe--name {
    &:before {
      content: '' ;
      padding-top: 13px ;
      width: 190px ;
    }
  }
  
  .shoe--colors {
    position: absolute ;
    left: 0 ;
    bottom: 0 ;
    width: 100% ;
    display: flex ;
    justify-content: center ;

    .colors {
      width: auto ;
      margin: 0 auto ;
      position: relative ;
      left: 10px ;
      will-change: transform ;
      opacity: 0 ;
      transform: translateY(8px) ;
      transition: all .33s ease-in ;
      transition-delay: .153s ;
    }
  }
  
  
  &:hover {
    .shoe--colors {
      .colors {
        opacity: 1 ;
        transform: translateY(0) ;
        transition: all .33s ease-out ;
        transition-delay: .253s ;
      }
      
    }
    .shoe {
      transform: scale(1.06) ;
      transition: all .5s ease ;
    }
    .shoe--info {
      transform: scale(.95) ;
      transition: all .4s ease ;
    }
  }
  
  &.card--one {
    .shoe--name {
      &:before {
        border-top: 5px solid red ;
      }
    }
  }
  
  &.card--two {
    .shoe--name {
      &:before {
        border-top: 5px solid black ;
      }
    }
  }
  &.card--three {
    .shoe--name {
      &:before {
        border-top: 5px solid #5695c3 ;
      }
    }
  }
  

}

// Modifiers

.group-one {
  background-color: #eaeaea ;
  background-image: none ;
  // background-image: url(https://bit.ly/2lpmFYM);
  // background-blend-mode: luminosity ;
  
  .group--title {
    h1, h2, h3, h4 {
      &:before {
        border-color: #d33f4b ;
      }
    }
  }
}

.group-two {
  @extend .color1 ;
 
  .group--title {
    color: rgba(250, 250, 250, 0.85) ;
    
    h1, h2, h3, h4 {
      &:before {
        border-color: rgba(250, 250, 250, 0.9) ;
      }
    }
  }
  .group--subtitle {
    color: rgba(250, 250, 250, 0.85) ;
  }
  
  
  
  
  
  .is--active {
    transform: scale(1.2) ;
    transform-origin: center center ;
  }
  
   .shoe--info {

    
    .shoe--name {
       color: #fff;
    }
    .shoe--price {
       color: #fff;
    }
    
  }
}

.group-three {
  background-image: none ;
  background-color: #f4f4f4 ;
  
  .shop-all {
    width: 100% ;
    display: flex ;
    align-items: center ;
    justify-content: center ;
    margin: 120px 0 0 0 ;
    // text-align: center ;
    .button {
      border: 3px solid #444 ;
      outline: 0 ;
      background-color: transparent;
      border-radius: 2px ;
      padding: 9px 18px ;
      font-size: 13px ;
      font-family: "Roboto", sans-serif ;
      font-weight: 700 ;
      text-transform: uppercase ;
      transition: all .23s ease ;
      transform: scale(1) ;
      
      &:hover {
        background-color: #232323 ;
        color: #fff ;
        transform: scale(1.05) ;
        transition: all .23s ease ;
      }
    }
    
    // display: none ;
  }
  
}
              
            
!

JS

              
                // Variables
  var colorButton = $(".colors li");

  colorButton.on("click", function(){
    // console.log('clicked');

    // Remove class from currently active button
    $(".colors > li").removeClass("active-color");

    // Add class active to clicked button
    $(this).addClass("active-color");

    // Get background color of clicked
    var newColor = $(this).attr("data-color");
    // alert(newColor);

    // Change background of everything with class .bg-color
    $(".merry-christmas").css("background-color", newColor);

    // Change color of everything with class .text-color
    // $(".text-color").css("color", newColor);
  });

"use strict";!function(t){t.fn.tilt=function(s){var i=function(){this.ticking||(requestAnimationFrame(g.bind(this)),this.ticking=!0)},e=function(){t(this).on("mousemove",r),t(this).on("mouseenter",n),this.settings.reset&&t(this).on("mouseleave",l)},a=function(){var s=this;void 0!==this.timeout&&clearTimeout(this.timeout),t(this).css({transition:this.settings.speed+"ms "+this.settings.easing}),this.settings.glare&&this.glareElement.css({transition:"opacity "+this.settings.speed+"ms "+this.settings.easing}),this.timeout=setTimeout(function(){t(s).css({transition:""}),s.settings.glare&&s.glareElement.css({transition:""})},this.settings.speed)},n=function(s){this.ticking=!1,t(this).css({"will-change":"transform"}),a.call(this),t(this).trigger("tilt.mouseEnter")},h=function(s){return"undefined"==typeof s&&(s={pageX:t(this).offset().left+t(this).outerWidth()/2,pageY:t(this).offset().top+t(this).outerHeight()/2}),{x:s.pageX,y:s.pageY}},r=function(t){this.mousePositions=h(t),i.call(this)},l=function(){a.call(this),this.reset=!0,i.call(this),t(this).trigger("tilt.mouseLeave")},o=function(){var s=t(this).width(),i=t(this).height(),e=t(this).offset().left,a=t(this).offset().top,n=(this.mousePositions.x-e)/s,h=(this.mousePositions.y-a)/i,r=(this.settings.maxTilt/2-n*this.settings.maxTilt).toFixed(2),l=(h*this.settings.maxTilt-this.settings.maxTilt/2).toFixed(2),o=Math.atan2(this.mousePositions.x-(e+s/2),-(this.mousePositions.y-(a+i/2)))*(180/Math.PI);return{tiltX:r,tiltY:l,percentageX:100*n,percentageY:100*h,angle:o}},g=function(){return this.transforms=o.call(this),this.reset?(this.reset=!1,t(this).css("transform","perspective("+this.settings.perspective+"px) rotateX(0deg) rotateY(0deg)"),void(this.settings.glare&&(this.glareElement.css("transform","rotate(180deg) scale(1.75)"),this.glareElement.css("opacity",""+this.settings.maxGlare/4)))):(t(this).css("transform","perspective("+this.settings.perspective+"px) rotateX("+("x"===this.settings.axis?0:this.transforms.tiltY)+"deg) rotateY("+("y"===this.settings.axis?0:this.transforms.tiltX)+"deg) scale3d("+this.settings.scale+","+this.settings.scale+","+this.settings.scale+")"),this.settings.glare&&(this.glareElement.css("transform","rotate("+this.transforms.angle+"deg) scale(1.75)"),this.glareElement.css("opacity",""+this.transforms.percentageY*this.settings.maxGlare/100)),t(this).trigger("change",[this.transforms]),void(this.ticking=!1))},c=function(){if(!this.settings.glarePrerender){t(this).append('<div class="js-tilt-glare"><div class="js-tilt-glare-inner"></div></div>'),this.glareElementWrapper=t(this).find(".js-tilt-glare"),this.glareElement=t(this).find(".js-tilt-glare-inner");var s={position:"absolute",top:"0",left:"0",width:"100%",height:"100%"};this.glareElementWrapper.css(s).css({overflow:"hidden"}),this.glareElement.css(s).css({"background-image":"linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%)",opacity:""+this.settings.maxGlare/2,transform:"rotate(180deg) scale(1.75)"})}};return t.fn.tilt.destroy=function(){t(this).each(function(){t(this).find(".js-tilt-glare").remove(),t(this).css({"will-change":"",transform:""}),t(this).off("mousemove mouseenter mouseleave")})},t.fn.tilt.getValues=function(){var s=[];return t(this).each(function(){this.mousePositions=h.call(this),s.push(o.call(this))}),s},t.fn.tilt.reset=function(){t(this).each(function(){var s=this;this.mousePositions=h.call(this),this.settings=t(this).data("settings"),l.call(this),setTimeout(function(){s.reset=!1},this.settings.transition)})},this.each(function(){var i=this;this.settings=t.extend({maxTilt:t(this).is("[data-tilt-max]")?t(this).data("tilt-max"):20,perspective:t(this).is("[data-tilt-perspective]")?t(this).data("tilt-perspective"):300,easing:t(this).is("[data-tilt-easing]")?t(this).data("tilt-easing"):"cubic-bezier(.03,.98,.52,.99)",scale:t(this).is("[data-tilt-scale]")?t(this).data("tilt-scale"):"1",speed:t(this).is("[data-tilt-speed]")?t(this).data("tilt-speed"):"400",transition:!t(this).is("[data-tilt-transition]")||t(this).data("tilt-transition"),axis:t(this).is("[data-tilt-axis]")?t(this).data("tilt-axis"):null,reset:!t(this).is("[data-tilt-reset]")||t(this).data("tilt-reset"),glare:!!t(this).is("[data-tilt-glare]")&&t(this).data("tilt-glare"),maxGlare:t(this).is("[data-tilt-maxglare]")?t(this).data("tilt-maxglare"):1},s),this.init=function(){t(i).data("settings",i.settings),i.settings.glare&&c.call(i),e.call(i)},this.init()})},t("[data-tilt]").tilt()}(jQuery);


// $('.card').tilt({
//     // axis: X
// });
// }(jQuery);

AOS.init({
  duration: 1200,
})
              
            
!
999px

Console