cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <main id="main-slider">
  <section class="case case1" data-name="case1">
    <div class="backgroundColor"></div>
    <div class="circle-effect">
      <div class="shape-wrap"><span class="shape shape1"></span></div>
      <div class="shape-wrap"><span class="shape shape2"></span></div>
      <div class="shape-wrap"><span class="shape shape3"><img src="http://thomaspodgro.com/pen/logo_nautic.png" alt="" /></span>
      </div></div>
    <div class="wrap">
      <div class="text">
        <div class="circle"></div>
        <h3>Title test</h3>
        <br/><br/>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio earum cupiditate cum, deleniti quasi eum rem, dicta, quo id voluptatem optio !
        <br/><br/>
        Illo cum nobis accusamus cupiditate vero temporibus eum necessitatibus illo cum nobis accusamus cupiditate vero temporibus eum necessitatibus.
        <br/><br/><br/>
        <a class="cta">See the case</a>
      </div>
    </div>
  </section>
  <section class="case case2" data-name="case2">
    <div class="backgroundColor"></div>
    <div class="circle-effect">
      <div class="shape-wrap"><span class="shape shape1"></span></div>
      <div class="shape-wrap"><span class="shape shape2"></span></div>
      <div class="shape-wrap"><span class="shape shape3"><img src="http://thomaspodgro.com/pen/logo_festview.png" alt="" /></span>
      </div></div>
    <div class="wrap">
      <div class="text">
        <div class="circle"></div>
        <h3>Title test</h3>
        <br/><br/>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio earum cupiditate cum, deleniti quasi eum rem, dicta, quo id voluptatem optio !
        <br/><br/>
        Illo cum nobis accusamus cupiditate vero temporibus eum necessitatibus illo cum nobis accusamus cupiditate vero temporibus eum necessitatibus.
        <br/><br/><br/>
        <a class="cta">See the case</a>
      </div>
    </div>
  </section>
  <section class="case case3" data-name="case3">
    <div class="backgroundColor"></div>
    <div class="circle-effect">
      <div class="shape-wrap"><span class="shape shape1"></span></div>
      <div class="shape-wrap"><span class="shape shape2"></span></div>
      <div class="shape-wrap"><span class="shape shape3"><img src="http://thomaspodgro.com/pen/logo_lbc.png" alt="" /></span>
      </div></div>
    <div class="wrap">
      <div class="text">
        <div class="circle"></div>
        <h3>Title test</h3>
        <br/><br/>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio earum cupiditate cum, deleniti quasi eum rem, dicta, quo id voluptatem optio !
        <br/><br/>
        Illo cum nobis accusamus cupiditate vero temporibus eum necessitatibus illo cum nobis accusamus cupiditate vero temporibus eum necessitatibus.
        <br/><br/><br/>
        <a class="cta">See the case</a>
      </div>
    </div>
  </section>
  <section class="case case4" data-name="case4">
    <div class="backgroundColor"></div>
    <div class="circle-effect">
      <div class="shape-wrap"><span class="shape shape1"></span></div>
      <div class="shape-wrap"><span class="shape shape2"></span></div>
      <div class="shape-wrap"><span class="shape shape3"><img src="http://thomaspodgro.com/pen/logo_edoc.png" alt="" /></span>
      </div></div>
    <div class="wrap">
      <div class="text">
        <div class="circle"></div>
        <h3>Title test</h3>
        <br/><br/>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio earum cupiditate cum, deleniti quasi eum rem, dicta, quo id voluptatem optio !
        <br/><br/>
        Illo cum nobis accusamus cupiditate vero temporibus eum necessitatibus illo cum nobis accusamus cupiditate vero temporibus eum necessitatibus.
        <br/><br/><br/>
        <a class="cta">See the case</a>
      </div>
    </div>
  </section>
</main>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Montserrat:400,700');

* {
  margin:0;
  padding:0;
  outline:none;
  list-style:none;
  text-decoration:none;
  box-sizing:border-box;
  color:#111;
  background: transparent;
  border:none;
}

body {
  background: #111;
  font-family: 'Montserrat', sans-serif;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

section.case {
  overflow: hidden;
  height: 100vh;
  position: relative;
}

.case .backgroundColor {
  position: fixed;
  opacity: 0;
  height: 100%;
  width: 100%;
  top: 0;left: 0;
  transition: 0.6s all ease-out;
  -webkit-transition: 0.6s all ease-out;
  -moz-transition: 0.6s all ease-out;
}

.owl-item.active .case .backgroundColor {
  opacity: 1;;
}

.case1 .backgroundColor {
  background: #1e2b39;
}
.case2 .backgroundColor {
  background: #30acd5; /* Old browsers */
  background: -moz-linear-gradient(-45deg, #30acd5 0%, #7a4ae2 100%); /* FF3.6-15 */
  background: -webkit-linear-gradient(-45deg, #30acd5 0%,#7a4ae2 100%); /* Chrome10-25,Safari5.1-6 */
  background: linear-gradient(135deg, #30acd5 0%,#7a4ae2 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#30acd5', endColorstr='#7a4ae2',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
.case3 .backgroundColor {
  background: #1D1D1D;
}
.case4 .backgroundColor {
  background: #f95536;
}
.case .wrap {
  z-index: 3;
  position: relative;
  max-width: 80%;
  margin: 0 auto;
  height: 440px;
  top: 50%;
  opacity: 0;
  transform: translateY(-50%) translateX(150px);
  -moz-transform: translateY(-50%) translateX(150px);
  -webkit-transform: translateY(-50%) translateX(150px);
  transition: 0.4s all ease-out 0.4s;
  -webkit-transition: 0.4s all ease-out 0.4s;
  -moz-transition: 0.4s all ease-out 0.4s;
}

.owl-item.active .case .wrap {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  -moz-transform: translateY(-50%) translateX(0);
  -webkit-transform: translateY(-50%) translateX(0);
}

.case .wrap h3 {
  display: inline;
  color: #fff;
  font-size: 2rem;
}

.case .circle {
  float: left;
  background: transparent;
  height: 400px;
  width: 70%;
  border-radius:50%;
  display: inline-block;
  shape-outside: circle(50%);
  -webkit-clip-path: circle(50%);
}

.case .wrap .text {
  max-width:1000px;
  float: right;
  line-height: 1.6;
  color: #fff;
}

.case .circle-effect {
  position: absolute;
  top: 0;left: 0;right: 0;bottom: 0;
  margin: auto;
  z-index: 2;
}
.case .circle-effect .shape {
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: #a3d3e2; /* Old browsers */
  background: -moz-linear-gradient(-150deg, rgba(19, 175, 229,0.08) 0%, rgba(19, 175, 229,0.05) 100%); /* FF3.6-15 */
  background: -webkit-linear-gradient(-150deg, rgba(19, 175, 229,0.08) 0%,rgba(19, 175, 229,0.05) 100%); /* Chrome10-25,Safari5.1-6 */
  background: linear-gradient(-150deg, rgba(19, 175, 229,0.08) 0%,rgba(19, 175, 229,0.05) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
  display: block;
  position: absolute;
  top: 0;left: 0;bottom: 0;right: 0;
  margin: auto;
  z-index: 1;
  box-shadow: 0 14vh 40px rgba(0,0,0,0.3);
  transition: 0.4s all ease-out;
  -webkit-transition: 0.4s all ease-out;
  -moz-transition: 0.4s all ease-out;
transform: translate3d(0, 0, 0);
 -webkit-transform: translate3d(0, 0, 0);
         transform-style: preserve-3d;
 -webkit-transform-style: preserve-3d;
         backface-visibility: hidden;
 -webkit-backface-visibility: hidden;
}
.case .circle-effect .shape1 {
  width: 600px;
  height: 600px;
  z-index: 1;
}
.case .circle-effect .shape2 {
  width: 450px;
  height: 450px;
  z-index: 2;
}
.case .circle-effect .shape3 {
  width: 300px;
  height: 300px;
  z-index: 3;
}
.case .circle-effect .shape-wrap {
  display: block;
  position: absolute;
  top: 0;left: 0;bottom: 0;right: 0;
  margin: auto;
  width: 600px;
  height: 600px;
  transform: scale(0);
  -webkit-transform: scale(0);
  -moz-transform: scale(0);
  transition: 0.4s all ease-out;
  -webkit-transition: 0.4s all ease-out;
  -moz-transition: 0.4s all ease-out;
transform: translate3d(0, 0, 0);
 -webkit-transform: translate3d(0, 0, 0);
         transform-style: preserve-3d;
 -webkit-transform-style: preserve-3d;
         backface-visibility: hidden;
 -webkit-backface-visibility: hidden;
}
.owl-item.active .case .circle-effect .shape-wrap:nth-of-type(1) {
  transition-delay: 0.1s;
  -webkit-transition-delay: 0.1s;
  -moz-transition-delay: 0.1s;
}
.owl-item.active .case .circle-effect .shape-wrap:nth-of-type(2) {
  transition-delay: 0.2s;
  -webkit-transition-delay: 0.2s;
  -moz-transition-delay: 0.2s;
}
.owl-item.active .case .circle-effect .shape-wrap:nth-of-type(3) {
  transition-delay: 0.3s;
  -webkit-transition-delay: 0.3s;
  -moz-transition-delay: 0.3s;
}
.owl-item.active .case .circle-effect .shape-wrap {
  transform: scale(1);
  -webkit-transform: scale(1);
  -moz-transform: scale(1);
}


.case .shape img {
  display: block;
  margin: auto;
  width: 50%;
  max-width: 500px;
  position: absolute;
  top: 0;right: 0;bottom: 0;left: 0;
  transition: 0.3s all ease-out;
  -webkit-transition: 0.3s all ease-out;
  -moz-transition: 0.3s all ease-out;
}

.case.shape-active .shape{
  width: 60vh;
  height: 60vh;
}
.case.shape-active .shape img {
  width: 40%;
}

/* when cta clicked */

.owl-item.active .case.isClicked .wrap {
  transform: translateX(100vw) translateY(-50%);
  -webkit-transform: translateX(100vw) translateY(-50%);
  -moz-transform: translateX(100vw) translateY(-50%);
  opacity: 0;
  transition: 0.4s all ease-out;
   -webkit-transition: 0.4s all ease-out;
   -moz-transition: 0.4s all ease-out;
  transition-delay: 0.3s;
  -webkit-transition-delay: 0.3s;
  -moz-transition-delay: 0.3s;
}
.case.isClicked .shape-wrap{
  transform: scale(0) !important;
  -webkit-transform: scale(0) !important;
  -moz-transform: scale(0) !important;
  transition: 0.2s all ease-out;
   -webkit-transition: 0.2s all ease-out;
   -moz-transition: 0.2s all ease-out;
}
.case.isClicked .shape-wrap:first-of-type{
  transform: scale(6) !important;
  -webkit-transform: scale(6) !important;
  -moz-transform: scale(6) !important;
  transition: 0.4s all ease-out;
   -webkit-transition: 0.4s all ease-out;
   -moz-transition: 0.4s all ease-out;
}
.case.isClicked .shape img {
  transform: scale(0);
  -webkit-transform: scale(0);
  -moz-transform: scale(0);
}
.owl-item.active .case.isClicked .circle-effect .shape-wrap:nth-of-type(1) {
  transition-delay: 0.3s;
  -webkit-transition-delay: 0.3s;
  -moz-transition-delay: 0.3s;
}
.owl-item.active .case.isClicked .circle-effect .shape-wrap:nth-of-type(2) {
  transition-delay: 0.2s;
  -webkit-transition-delay: 0.2s;
  -moz-transition-delay: 0.2s;
}
.owl-item.active .case.isClicked .circle-effect .shape-wrap:nth-of-type(3) {
  transition-delay: 0.1s;
  -webkit-transition-delay: 0.1s;
  -moz-transition-delay: 0.1s;
}

.cta {
  color: #fff;
  border:1px solid #fff;
  border-radius: 50px;
  padding:8px 15px;
  margin-left: 10px;
  cursor: pointer;
  transition: 0.1s all ease-out;
  -webkit-transition: 0.1s all ease-out;
  -moz-transition: 0.1s all ease-out;
}

.cta:hover {
  background: #fff;
  color: #1e2b39;
}

.case2 .circle-effect .shape {
  background: rgba(60,40,115,0.1);
}
.case3 .circle-effect .shape {
  background: rgba(60,60,60,0.1);
}
.case4 .circle-effect .shape {
  background: rgba(48,38,29,0.1);
}

.owl-item {
  cursor: move;
}
            
          
!
            
              var elSection, currentSlide;

$('#main-slider').addClass('owl-carousel').owlCarousel({
  items: 1,
  loop: false,
  autoWidth:false,
  smartSpeed: 450,
  dots: false
});

$('.cta').click(function(){
  $(this).parent().parent().parent().addClass('isClicked');
}); 

$(document).ready(function(){
  $('.owl-item').mousemove(function(e){
    var x= e.pageX - ($(window).innerWidth() / 2);
    var y= e.pageY - ($(window).innerHeight() / 2);
    console.log(parseInt(x*(-0.05))+' - '+parseInt(y*(-0.1)));
    elSection = $(this).find($('.case'));
    if($(this).hasClass('active')) {
      $(this).find($('.shape1')).css({
        'transform': 'translateX('+parseInt(x*(-0.05))+'px) translateY('+parseInt(y*(-0.1))+'px)'
      });
      $(this).find($('.shape2')).css({
        'transform': 'translateX('+parseInt(x*(-0.1))+'px) translateY('+parseInt(y*(-0.2))+'px)'
      });
      $(this).find($('.shape3')).css({
        'transform': 'translateX('+parseInt(x*(-0.15))+'px) translateY('+parseInt(y*(-0.3))+'px)'
      });
    }
  });
  $('.cta').hover(function(){
    elSection.toggleClass('shape-active');
  });
});


            
          
!
999px
Loading ..................

Console