123

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

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.

            
              <header>
  <div class="bubble"></div>
</header>

<div class="cards">

  <section class="row">
    <div class="col s12 m3 l2">
      <div class="icon">
      <i class="material-icons">layers</i>
      </div>
    </div>
    <div class="col s12 m9 l10">
      <h1>A good UX Web Design</h1>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
    </div>
  </section>

  <section class="row">
    <div class="col s12 m3 l2">
      <div class="icon">
      <i class="material-icons">layers</i>
      </div>
    </div>
    <div class="col s12 m9 l10">
      <h1>Responsive for all devices</h1>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
    </div>
  </section>

  <section class="row">
    <div class="col s12 m3 l2">
      <div class="icon">
      <i class="material-icons">layers</i>
      </div>
    </div>
    <div class="col s12 m9 l10">
      <h1>A multitude of extensions</h1>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
    </div>
  </section>

  <section class="row">
    <div class="col s12 m3 l2">
      <div class="icon">
      <i class="material-icons">layers</i>
      </div>
    </div>
    <div class="col s12 m9 l10">
      <h1>+30 videos tutorial</h1>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
    </div>
  </section>

  <section class="added" id="section0">
    <h1>IT'S A NEW ELEMENT !</h1>
  </section>

</div>

<a href="#!" onclick="addSection(this)">
  <div class="floating-button" href="#toast" data-toggle="toast" data-toast-posy="top" data-toast-posx="right" data-toast-inner="You have added a new element" data-toast-delay="5" >+</div>
</a>
            
          
!
            
              body {
  background: #F1F1F1;
  font-family: 'Roboto', sans-serif;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  Height: 30vh;
  background: #F1F1F1;
  overflow: hidden;
}

.bubble {
	height: 60px;
	width: 60px;
	background-color: #2196F3;
	top: 15vh;
	right: 50%;
	position: absolute;
	border-radius: 50%;
	-webkit-transform: scale(60);
	-webkit-animation: bg-in 4s cubic-bezier(0.2, 0.3, 0, 1);
  animation: bg-in 4s cubic-bezier(0.2, 0.3, 0, 1);
}

@-webkit-keyframes bg-in {
  from {
    -webkit-transform: scale(0);
            transform: scale(0);
  }
}

@keyframes bg-in {
  from {
    -webkit-transform: scale(0);
            transform: scale(0);
  }
}

.floating-button {
  position: fixed;
  z-index: 100;
  width: 50px;
  height: 50px;
  background: #E91E63;
  color: #FFF;
  font-size: 2em;
  border-radius: 50%;
  top: 30vh;
  right: 10%;
  margin-top: -25px;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-flex-direction: column;
  flex-direction: column;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
  -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
  -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
  -webkit-transition: all 0.3s linear;
  -o-transition: all 0.3s linear;
  -moz-transition: all 0.3s linear;
  -ms-transition: all 0.3s linear;
  -kthtml-transition: all 0.3s linear;
  transition: all 0.3s linear;
}

.floating-button:hover {
  box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.3);
  -moz-box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.3);
  -webkit-box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.3);
  margin-top: -30px;
}

.floating-button:active {
  box-shadow: 0 10px 15px 0 rgba(0, 0, 0, 0.4);
  -moz-box-shadow: 0 10px 15px 0 rgba(0, 0, 0, 0.4);
  -webkit-box-shadow: 0 10px 15px 0 rgba(0, 0, 0, 0.4);
  margin-top: -32px;
  background: #EC407A;
}

section {
  position: relative;
  margin: 0 auto;
  margin-bottom: 20px;
  max-width: 940px;
  min-height: 80px;
  padding: 20px;
  background: #FFF;
  border-radius: 5px;
  border-bottom: 3px solid rgba(0, 0, 0, 0.15);
}

section h1 {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.3em;
  color: #555;
}

section p {
  margin: 15px 0 0 0;
  font-weight: 300;
  line-height: 1.4em;
  font-size: 0.95em;
  color: #888;
}

.cards {
  margin-top: 20vh;
  margin-left: 20px;
  margin-right: 20px;
}

.icon {
  text-align: center;
}

.cards i {
  font-size: 4em;
  padding: 15px;
  color: #CCC;
  border: 8px solid #CCC;
  border-radius: 50%;
}

section:hover .icon > i{
  color: #2196F3;
  border: 8px solid #2196F3;
}

#section0 {
  display: none;
}

.added h1 {
  text-align: center;
  padding-top: 35px;
  font-size: 1.3em;
}

[class*=material-] [class*=m-toast] {
  margin: 1em;
  position: fixed;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  padding: 16px 24px;
  border-radius: 2px;
  float: left;
  min-width: 216px;
  max-width: 426px;
  width: auto;
  max-height: 66px;
  transition: all .3s ease
}

[class*=material-] [class*=m-toast] p {
  font-size: 14px
}

[class*=material-] [class*=m-toast][class*=top] {
  top: -100%;
  transition: top .3s ease
}

[class*=material-] [class*=m-toast][class*=top].on-screen {
  top: 0;
  float: left;
  transition: top .3s ease
}

[class*=material-] [class*=m-toast][class*=left] {
  left: -100%;
  transition: left .3s ease
}

[class*=material-] [class*=m-toast][class*=left].on-screen {
  left: 0;
  float: left;
  transition: left .3s ease
}

[class*=material-] [class*=m-toast][class*=bottom] {
  bottom: -100%;
  transition: bottom .3s ease
}

[class*=material-] [class*=m-toast][class*=bottom].on-screen {
  bottom: 0;
  float: left;
  transition: bottom .3s ease
}

[class*=material-] [class*=m-toast][class*=right] {
  right: -100%;
  transition: right .3s ease
}

[class*=material-] [class*=m-toast][class*=right].on-screen {
  right: 0;
  float: left;
  transition: right .3s ease
}


@media screen and (max-width: 600px) {
  header {
    height: 50vh;
  }
  .floating-button {
    top: 90vh;
    bottom: 10px;
    right: 10px;
  }
  .icon {
    display: block;
  }
  section h1 {
    margin: 30px 0 0 0;
  }
  .added h1 {
    padding-top: 15px;
  }
}

@media screen and (max-width: 1200px) {
  .floating-button {
    right: 10px;
  }
}
            
          
!
            
              function addSection(where) {
  var main = document.getElementById("section0");
  var cntr = (main.datacntr || 0) + 1;
  main.datacntr = cntr;

  var clone = main.cloneNode(true);
  clone.id = "section" + cntr;
  where.parentNode.insertBefore(clone, where);
}

$(function() {

  var i = 0;

  setInterval(function() {
    i++;
    $('a').attr('data-toast-inner', i);
  }, 1000);

  $('a').on('click', function(e) {
    setTimeout(function() {
      $('#toast').empty().html($('a[href*="toast"]').attr('data-toast-inner'));
    }, 500)
  })

});

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console