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 id="app-container" data-tilt>
  <div id="app">
    <vue-tabs id="tabs">
      <v-tab title="First Tab" class="tab" :selected="true">
        <div class="tab-content">
          <div class="tab-image first-image"></div>
          <div class="tab-content-text">
            <h1>First Header</h1>
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt nu aliqua. Sollicit udin purus faucibus ornare aliquam ultrices sagittis orci a scelerisque a consectetur atna purus.</p>
          </div>
        </div>
      </v-tab>

      <v-tab title="Second Tab" class="tab">
        <div class="tab-content">
          <div class="tab-image second-image"></div>
          <div class="tab-content-text">
            <h1>Second Header</h1>
            <p>Ac tortor vitae purus faucibus ornare suspendisse uis tristique sed nisi. Consectetur libero id ax faucibus in ornare faucibus nislt udin purus fi faucibus ac ornare aliquam ultrices in purus faucibu.</p>
          </div>
        </div>
      </v-tab>

      <v-tab title="Third Tab" class="tab">
        <div class="tab-content">
          <div class="tab-image third-image"></div>
          <div class="tab-content-text">
            <h1>Third Header</h1>
            <p>Scelerisque fermentum dui faucibus in ornare id. Amet consectetur adipiscing elit duis tristique sollicitudin purus faucibus ornare aliquam ultrices sagittis nibh elit duis nubro tristique itae purus faucibus.</p>
          </div>
        </div>
      </v-tab>
    </vue-tabs>

  </div>

</div>

              
            
!

CSS

              
                $black: #071011;
$white: #fff;
$bkg-color: linear-gradient(to bottom, #2193b0, #6dd5ed);

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: $bkg-color;
  color: $white;
  font: 300 16px "Montserrat", sans-serif;
  line-height: 20px;
}

#app-container {
  width: 500px;
  height: 400px;
  background: $white;
  border-radius: 5px;
  background: transparent;

  transform-style: preserve-3d;
}

.vue-tabs {
  box-shadow: 0 12px 32px -10px $black;
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
}

/***** Nav Bar *****/

#tabs {
  height: 100%;
  transition: 0.3s;
}

.vue-tabs .nav-tabs {
  background: $black;
  border-bottom: $black;
  text-align: center;
  border-top-right-radius: 5px;
  border-top-left-radius: 5px;
}

.vue-tabs .nav-tabs > li {
  float: none;
  display: inline-block;
  margin-bottom: 0;
  cursor: pointer;
  font-weight: 400;
}

.vue-tabs .nav-tabs > li > a {
  border-radius: 0;
  transition: 0.2s;
  padding: 12px 15px;
  margin-right: 0;
}

.vue-tabs .nav-tabs > li > a:hover {
  background: inherit;
}

.vue-tabs .nav > li > a:hover,
.vue-tabs .nav > li > a:focus {
  color: $white;
  border-color: $black;
}

/***** Tab Content *****/

.tab .tab-content {
  position: relative;
  top: 0;
  left: 0;
  height: 350px;
}

.tab .tab-content .tab-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
}

.tab .tab-content .tab-image:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
}

.tab .tab-content .first-image {
  background: url("https://images.unsplash.com/photo-1564923630403-2284b87c0041?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1651&q=80")
    no-repeat;
  background-size: cover;
  background-position: 0;
}

.tab .tab-content .second-image {
  background: url("https://images.unsplash.com/photo-1542206395-9feb3edaa68d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1600&q=80")
    no-repeat;
  background-size: cover;
  background-position: 0;
}

.tab .tab-content .third-image {
  background: url("https://images.unsplash.com/photo-1548543604-a87c9909abec?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1268&q=80")
    no-repeat;
  background-size: cover;
  background-position: 0;
}

.tab-content-text {
  padding-top: 35px;
}

.tab h1 {
  position: relative;
  font: 400 2.5em "Oswald", sans-serif;
  transform: translateZ(20px);
  top: 0;
  left: 70px;
}

.tab p {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  padding: 0 40px;
  line-height: 24px;
  letter-spacing: 0.4px;

  transform: translateZ(20px);
  top: -25px;
  left: 0;
  padding: 0 70px;
}

              
            
!

JS

              
                new Vue({
  el:"#app",
});

$('.js-tilt').tilt({

})

              
            
!
999px

Console