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

              
                      <h1><small>Day #25</small> Sliding Panels</h1>

      <div class="sandbox">
      <div class="content">
        <section>

          <h4>Slide from Top</h4>
          <div class="slide slide-top">
            <div class="slide-content">Lorem ipsum dolor sit amet, consectetur adipisicing elit.</div>
            <img src="https://placeimg.com/300/200/animals">
          </div>

        </section>

        <section>

          <h4>Slide from Right</h4>
          <div class="slide slide-right">
            <div class="slide-content">Lorem ipsum dolor sit amet, consectetur adipisicing elit.</div>
            <img src="https://placeimg.com/300/200/tech">
          </div>

        </section>

        <section>

          <h4>Slide from Bottom</h4>
          <div class="slide slide-bottom">
            <div class="slide-content">Lorem ipsum dolor sit amet, consectetur adipisicing elit.</div>
            <img src="https://placeimg.com/300/200/architecture">
          </div>

        </section>

        <section>

          <h4>Slide from Left</h4>
          <div class="slide slide-left">
            <div class="slide-content">Lorem ipsum dolor sit amet, consectetur adipisicing elit.</div>
            <img src="https://placeimg.com/300/200/people">
          </div>

        </section>
      </div>
    </div>
              
            
!

CSS

              
                /* SLIDE */

.slide {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.slide img {
  display: inline-block;
  vertical-align: middle;
}

.slide-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: rgba(255, 35, 69, 0.9);
  padding: 20px;
  color: white;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  transition: transform ease 0.3s;
}

.slide:hover .slide-content {
  transform: translate(0, 0);
}

/* DIRECTIONS */

.slide-top .slide-content {
  transform: translate(0, -100%);
}

.slide-right .slide-content {
  transform: translate(100%, 0);
}
.slide-bottom .slide-content {
  transform: translate(0, 100%);
}
.slide-left .slide-content {
  transform: translate(-100%, 0);
}





































/**********************************
***********************************
/* THEME CSS */
/**********************************
***********************************/

body {
  font-family: 'Roboto Condensed', "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* DARK PINK */
  background: #f2395a;

  /*TEAL*/
  /*background: #00B3B4;*/

  font-size: 20px;
  line-height: 28px;
  color: #323b40;
  margin: 40px 0;
}

  body::before {
    position: fixed;
    content: "";
    height: 400px;
    width: 400px;
    top: 20px;
    right: 30px;
    background: url('../_theme-styles/img/CSS30_Logo.png') no-repeat;
    background-size: 100%;
    opacity: .2;
  }


h1,h2,h3,h4,h5,h6 {
  font-family: 'Bubblegum Sans', cursive;
}

  h1 {
    width: 60%;
    max-width: 960px;
    margin: 0 auto 60px;
    transform: rotate(-3deg);
    color: white;
    text-align: left;
    font-size: 2.1rem;
    line-height: 2.1rem;
    text-shadow:  0 1px 0 hsl(52,7%,20%),
                  0 2px 0 hsl(52,7%,18%),
                  0 3px 0 hsl(52,7%,16%),
                  0 4px 0 hsl(52,7%,14%),
                  0 5px 0 hsl(52,7%,12%),
                  0 6px 0 hsl(52,7%,10%),
                  0 7px 0 hsl(52,7%,8%),
                  0 8px 0 hsl(52,7%,6%),

                  0 0 5px rgba(0,0,0,.05),
                  0 1px 3px rgba(0,0,0,.2),
                  0 3px 5px rgba(0,0,0,.2),
                  0 5px 10px rgba(0,0,0,.2),
                  0 10px 10px rgba(0,0,0,.2),
                  0 20px 20px rgba(0,0,0,.3);
  }

    h1 small {
      font-size: 1.5rem;
      display: block;
      color: #fa90a3;
      text-shadow: none;
    }


  h2 {
    color: white;
  }

    h2 small {
      font-weight: normal;
      font-size: 0.7rem;
      display: block;
      color: #323b40;
    }

  h3 small {
    font-weight: normal;
    font-family: 'Roboto Condensed', "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #888;
    display: block;
  }

  h4 {
    margin: 1rem 0
  }


a:link, a:visited {
  color: #00B3B4;
  text-decoration: none;
  border-bottom: dotted 1px #00B3B4;
}
  a:hover {
    background: #00B3B4;
    color: white;
    text-decoration: none;
  }


button {
  font-size: 1rem;
}


code {
  background: #fd6000;
  color: white;
  padding: 4px 6px;
  font-family: 'Nova Mono', monospace;
  font-size: 1rem;
  border-radius: 2px;
  box-shadow: inset 0 1px 2px #5e2400;
  display: inline-block;
}


section {
  position: relative;
  border-top: solid 1px #f9f9f9;
  border-bottom: solid 1px #ddd;
  padding: 25px 0;
}

  section:first-child::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 1px;
    border-top: solid 1px #ddd;
    top: -2px;
    left: 0;
  }

  section:last-child::after {
    position: absolute;
    content: "";
    width: 100%;
    border-top: solid 1px white;
    bottom: -2px;
    left: 0;
  }

  section footer {
    margin: inherit;
    width: inherit;
    color: inherit;
    font-size: inherit;
  }

  section header,
  section article,
  section nav,
  section aside,
  section footer,
  section .logo,
  section .articles {
    background: rgba(140, 204, 231, 0.2);
    border: solid 1px rgba(140, 204, 231, 0.3);
    padding: 2%;
    margin: 0 0 2%;
    font-size: 1rem;
    box-sizing: border-box;
  }

  section ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

    section ul li {
      display: inline-block;
      margin: 0 2% 0 0;
    }


.course-files {
  text-align: center;
}


a.button-theme {
  color: white;
  font-weight: bold;
  text-transform: uppercase;
}


.button-theme {
  position: relative;
	display: inline-block;
	padding: 10px 30px;
	text-align: center;
	color: white;

	text-shadow:-1px -1px 0 #2C7982;
	background: #00B3B4;
	border:1px solid #379AA4;

	-webkit-border-radius:4px;
	-moz-border-radius:4px;
	border-radius:4px;

	-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, .5) inset, 0 -1px 0 rgba(255, 255, 255, .1) inset, 0 4px 0 #338A94, 0 4px 2px rgba(0, 0, 0, .5);
	-moz-box-shadow:0 1px 0 rgba(255, 255, 255, .5) inset, 0 -1px 0 rgba(255, 255, 255, .1) inset, 0 4px 0 #338A94, 0 4px 2px rgba(0, 0, 0, .5);
	box-shadow:0 1px 0 rgba(255, 255, 255, .5) inset, 0 -1px 0 rgba(255, 255, 255, .1) inset, 0 4px 0 #338A94, 0 4px 2px rgba(0, 0, 0, .5);
}

  .button-theme::before {
  	background:#fa90a3;
  	background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ef758b), to(#fa90a3));

  	-webkit-border-radius: 4px;
  	-moz-border-radius: 4px;
  	border-radius: 4px;

  	-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .3) inset, 0 1px 0 rgba(255, 255, 255, .5);
  	-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .3) inset, 0 1px 0 rgba(255, 255, 255, .5);
  	box-shadow: 0 1px 2px rgba(0, 0, 0, .3) inset, 0 1px 0 rgba(255, 255, 255, .5);

  	position: absolute;
  	content: "";
  	left: -15px;
    right: -15px;
  	top: -14px;
    bottom: -17px;
  	z-index: -1;
  }

  .button-theme:active {
    -webkit-box-shadow:0 1px 0 rgba(255, 255, 255, .5) inset, 0 -1px 0 rgba(255, 255, 255, .1) inset, 0 2px 0 #338A94, 0 2px 2px rgba(0, 0, 0, .5);
  	-moz-box-shadow:0 1px 0 rgba(255, 255, 255, .5) inset, 0 -1px 0 rgba(255, 255, 255, .1) inset, 0 2px 0 #338A94, 0 2px 2px rgba(0, 0, 0, .5);
  	box-shadow:0 1px 0 rgba(255, 255, 255, .5) inset, 0 -1px 0 rgba(255, 255, 255, .1) inset, 0 2px 0 #338A94, 0 2px 2px rgba(0, 0, 0, .5);
  	top: 4px;
  }

  .button-theme:active::before{
  	top: -18px;
  	bottom: -13px;
  }

  .button-theme:hover {
  	background: #0bbfc0;
  }

  .button-theme small {
    display: block;
    color: #007a7b;
    text-shadow: none;
  }


.sandbox,
.final-result,
.info {
  position: relative;
  background: #e7eef1;
  width: 60%;
  max-width: 960px;
  margin: 60px auto;
  padding: 40px 40px 60px;
  box-sizing: border-box;
  border-radius: 2px;
  box-shadow: 0 12px 0 -6px #fa90a3;
}

  .sandbox::before,
  .final-result::before,
  .info::before {
    position: absolute;
    display: block;
    content: "";
    border: solid 6px transparent;
    border-right: solid 6px #fa90a3;
    border-top-width: 0px;
    background: none;
    bottom: -6px;
    left: -6px;
  }

  .sandbox::after,
  .final-result::after,
  .info::after {
    position: absolute;
    display: block;
    content: "";
    border: solid 6px transparent;
    border-top: solid 6px #fa90a3;
    border-bottom-width: 0px;
    background: none;
    right: 0;
    bottom: -6px;
  }


  .sandbox h2,
  .final-result h2,
  .info h2 {
    font-size: 1.4rem;
    display: inline-block;
    transform: rotate(-90deg);
    transition: all ease-in-out .1s;
    position: absolute;
    top: 60px;
    left: -85px;
    background: #e12345;
    margin: 0;
    line-height: 1.6rem;
    padding: 15px;
    z-index: -2;
    border-radius: 4px;
    min-width: 130px;
  }

  .sandbox:hover h2,
  .final-result:hover h2,
  .info:hover h2 {
    left: -110px;
  }

  .sandbox .button-theme,
  .final-result .button-theme {
    display: block;
    width: 80%;
    margin: 0 auto;
  }


.info {
  background: #323b40;
  color: white;
}

  .info h3 {
    margin: 1rem 0 0;
  }
  .info p {
    margin: 0 0 1rem;
    color: #888;
  }


.sticky-footer-lesson footer {
  position: relative;
  background: #e7eef1;
  padding: 40px 40px 60px;
  box-sizing: border-box;
  border-radius: 2px;
  color: #333;
}

  .sticky-footer-lesson footer a:link {
    color: #e12345;
  }

footer {
  width: 60%;
  max-width: 960px;
  margin: 0 auto;
  font-size: 1rem;
  color: #f29baa;
}

  footer a:link,
  footer a:visited {
    position: relative;
    display: inline-block;
    background: rgba(255,255,255, 0.2);
    padding: 0 5px;
    border: none;
    text-decoration: none;
    color: white;
  }
    footer a:hover {
      background: rgba(255,255,255, 0.4);
      box-shadow: -3px 3px 0 #eb2447;
      transform: rotate(-1deg);
    }

  footer .made-by, footer .course, footer .copyright {
    padding-left: 70px;
    transition: all ease 1000ms;
  }

  footer #logo {
    position: relative;
    z-index: 9;
    opacity: .4;
    float: left;
    margin-right: 15px;
    padding: 0;
    background: none;
    flex-direction: row;
    box-shadow: none;
    transition: all ease 1000ms;
  }

    footer #logo img {
      position: absolute;
      transform-style: preserve-3d;
      transition: all ease 1000ms;
    }

    footer:hover #logo_codecollege {
      width: 100px;
    }

    footer:hover #logo_bg-yellow {
      width: 80px;
      transform: translateX(-10px) translateY(10px) translateZ(-10px);
    }

    footer:hover #logo_bg-gray {
      transform: translateX(-20px) translateY(20px) translateZ(-20px);
    }

    footer:hover #logo {
      opacity: 1;
      transform: perspective(400px) rotateX(40deg) rotateY(20deg) rotateZ(-25deg) translateX(0) translateY(0px) translateZ(0);
    }

    footer:hover .made-by, footer:hover .course, footer:hover .copyright {
      padding-left: 140px;
    }

.button{
      cursor: pointer;
    }




              
            
!

JS

              
                
              
            
!
999px

Console