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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                	<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="false">
      <!-- Indicators -->
      <ol class="carousel-indicators">
        <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
        <li data-target="#myCarousel" data-slide-to="1"></li>
        <li data-target="#myCarousel" data-slide-to="2"></li>
      </ol>
      <div class="carousel-inner text-center" role="listbox">
        <div class="itemtext activeText">
			<p>Lorem ipsum amet I</p>
		</div>
		<div class="itemtext">
			<p>Lorem ipsum amet II</p>
		</div>
		<div class="itemtext">
			<p>Lorem ipsum amet III</p>
		</div>
      </div>
      <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
      </a>
      <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
      </a>
    </div><!-- /.carousel -->
              
            
!

CSS

              
                body{
  background-color: #FFCC80;
}
/*slide*/

.itemtext.activeText {
  transform: rotateX(0deg);
}

.itemtext.activeText ~ .itemtext {
  transform: rotateX(90deg);
}

.itemtext:not(.activeText) p{
  opacity: .4;
}

.itemtext{
  background-color: #fff;
  border: 1px solid rgba(0,0,0,.2);
  position: fixed;
  margin: 5% 26%;
  max-width: 600px;
  width: 100%;
  height: 192px;
  transition: transform 0.5s ease-out;
  transform-origin: 50% 50% -5vw;
  transform: rotateX(-90deg);
  z-index: 999;
}

.itemtext p{
  margin-top: 58px;
  font-size: 44px;
}

.carousel-slide {
  margin: auto;
}

.carousel-inner>.item {
  background-color: #000;
  width: 100%;
  height: 100%;
  background-position: center center;
  background-repeat: no-repeat;
  position: fixed;
  overflow: auto;
  background-size: cover;
}

.carousel-control {
  background : none!important;
  position: fixed;
}

.carousel-slide {
  margin: auto;
}

/*end slide*/

@media screen and (max-width: 992px){
  .itemtext {
    margin: 5% 11%;
  }
}

/*Phone*/
@media (max-width:767px){
  .itemtext {
    margin: 24% 12%;
    width: 75%;
    height: 100px;
  }
  .itemtext p {
    margin-top: 18px;
    font-size: 44px;
  }
}
              
            
!

JS

              
                //slide box
  $('.carousel').carousel({
    interval: false
  });

//text box slide
  var currentItemtext = 0,
  $itemtext = $('.itemtext'),
  itemtext = $itemtext.length,
  $activeText = $('.activeText'),
  $arrowRight = $('.right'),
  $arrowLeft = $('.left');

  function selectItems(number) {
    $(".itemtext").removeClass('activeText');
    $(".itemtext").eq(number).addClass('activeText');
  }

  // $('.carousel-inner>.item:first-child + .itemtext').addClass('activeText');

  function selectNextSlide() {
    if (currentItemtext === itemtext - 2) {
      $itemtext.first().insertAfter($itemtext.last());
      $itemtext = $('.itemtext');
      selectItems(currentItemtext);
    } else {
      var nextItemtext = (currentItemtext + 1) % itemtext;
      currentItemtext = nextItemtext;
      selectItems(currentItemtext);
    }
  }

  function selectPreviousSlide() {
    if (currentItemtext === 1) {
      $itemtext.last().insertBefore($itemtext.first());
      $itemtext = $('.itemtext');
     selectItems(currentItemtext);
    } else {
      var previousItemtext = (currentItemtext - 1 + itemtext) % itemtext;
      currentItemtext = previousItemtext;
     selectItems(currentItemtext);
    }
  }

  $arrowRight.on('click', selectNextSlide);
  $arrowLeft.on('click', selectPreviousSlide);
              
            
!
999px

Console