Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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 class="toolbar" id="toolbar">
        <div class="title">Animography - Mobilo Text Editor</div>
    <ul class="characters justification">
        <li class="characters__item characters__item--first left"><button class="characters__item__button"></button></li><!--
        --><li class="characters__item characters__item--middle center"><button class="characters__item__button"></button></li><!--
        --><li class="characters__item characters__item--last right"><button class="characters__item__button"></button></li>
    </ul>
    <ul class="characters sizing">
        <li class="characters__item characters__item--first size1"><button class="characters__item__button"></button></li><!--
        --><li class="characters__item characters__item--middle size2"><button class="characters__item__button"></button></li><!--
        --><li class="characters__item characters__item--last size3"><button class="characters__item__button"></button></li>
    </ul>
    <ul class="characters">
        <li class="characters__item characters__item--color " >
            <input class="characters__item__colorInput color1" type="color" id="color1"/>
        </li><!--
        --><li class="characters__item characters__item--color">
            <input class="characters__item__colorInput color2" type="color" id="color2"/>
        </li><!--
        --><li class="characters__item characters__item--color">
            <input class="characters__item__colorInput color3" type="color" id="color3"/>
        </li>
    </ul>
</div>
<div class="textBox">
        <div id="charsContainer"></div>
        <div class="bm caret" id="caret">|</div>
        <input type="text" class="textHelper">
</div>

              
            
!

CSS

              
                body {
  background-color: #eee;
}

html,
body {
  margin: 0px;
  height: 100%;
  overflow: hidden;
}

.toolbar {
  width: 100%;
  background: #fff;
  padding: 4px 10px;
}

.characters {
  display: inline-block;
  margin-right: 20px;
  vertical-align: top;
}

.characters__item {
  border: 1px solid #333333;
  border-radius: 0;
  display: inline-block;
  width: 25px;
  height: 25px;
  text-align: center;
  background-color: #eee;
}

.characters__item--selected {
  background: #fff;
}

.characters__item--first {
  border-bottom-left-radius: 2px;
  border-top-left-radius: 2px;
}

.characters__item--last {
  border-bottom-right-radius: 2px;
  border-top-right-radius: 2px;
}

.characters__item--middle {
  border-left-width: 0;
  border-right-width: 0;
}

.characters__item--color {
  border: 0;
  width: 55px;
}

.characters__item__button {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.characters__item__colorInput {
  width: 100%;
  cursor: pointer;
}

.bm {
  background-color: transparent;
  width: 100px;
  height: 120px;
  display: inline-block;
  /*float: left;*/
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  vertical-align: top;
  position: absolute;
  left: 0;
  top: 0;
}

.bm.char {
  pointer-events: none;
}

.bm .hoverer {
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  position: absolute;
  top: 0;
  left: 0;
}

.bm .loader {
  width: 50%;
  height: 50%;
  background-color: rgba(0, 0, 0, 0);
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  margin: auto;
}

.bm svg g {
  pointer-events: auto;
}

.space {
  position: absolute;
  transform: translate3d(0, 0, 0);
  width: 100px;
  height: 120px;
  background-color: rgba(255, 0, 0, 0);
  pointer-events: none;
}

.line-break {
  height: 120px;
  width: 0px;
}

.textBox {
  position: relative;
  top: 0;
  left: 0;
  overflow-y: auto;
  overflow-x: hidden;
  height: calc(100% - 56px);
  width: 100%;
}

.caret {
  position: absolute;
  top: 0;
  left: 0;
  background-color: #333333;
  width: 4px;
  margin-left: -2px;
  animation: blink-animation 1.5s steps(5, start) infinite;
  -webkit-animation: blink-animation 1.5s steps(5, start) infinite;
}

.textHelper {
  position: absolute;
  top: 0;
  left: -100%;
  /*visibility: hidden;*/
  opacity: 0.01;
}

@keyframes blink-animation {
  to {
    visibility: hidden;
  }
}

@-webkit-keyframes blink-animation {
  to {
    visibility: hidden;
  }
}

.title {
  float: right;
  line-height: 2em;
}
              
            
!

JS

              
                var BASE_URL = 'https://labs.nearpod.com/bodymovin/demo/mobilo_demo/';

    toolbar.init();
    textbox.init();
    animationProvider.init();

    window.onresize = textbox.resize;

              
            
!
999px

Console