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.

            
              <!doctype html>
<html>
    <head>
        <title> Obnoxious.css </title>
        <meta name="description" content="Animations for the strong of heart, and weak of mind.">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta charset="UTF-8">


        <!-- Facebook -->
        <meta property="og:title" content="Obnoxious.css"/>
        <meta property="og:url" content="http://tholman.com/obnoxious"/>
        <meta property="og:site_name" content="Obnoxious.css"/>
        <meta property="og:type" content="website"/>
        <meta property="og:description" content="Animations for the strong of heart, and weak of mind."/>
        <meta property="og:image" content=""/>

        <!-- Twitter -->
        <meta name="twitter:card" content="summary">
        <meta name="twitter:title" content="Obnoxious.css">
        <meta name="twitter:url" content="http://tholman.com/obnoxious">
        <meta name="twitter:description" content="Animations for the strong of heart, and weak of mind.">
        <meta name="twitter:image:src" content="">

        <!-- CSS -->
        <link href="./css/styles.css" rel="stylesheet">
        <link href="../obnoxious.css" rel="stylesheet">
        <link href="http://fonts.googleapis.com/css?family=Montserrat:700" rel="stylesheet" type="text/css">

    </head>
    <body>

      <div class="center">
        <h1 class="animated"> OBNOXIOUS.CSS </h1>
        <div class="description">
          Animations for the strong of heart, and weak of mind.
        </div>
        <div class="controls">

          <form>
            <div class="select">
              <select>
                <option value="shakeit">Shake It</option>
                <option value="intensifies">Intensifies</option>
                <option value="fontalicious">Fontalicious</option>
                <option value="strobe">Strobe</option>
                <option value="twister">Twister</option>
              </select>
            </div>

            <button>Run Animation</button>
          </form>

        </div>
      </div>
        
 
    </body>
</html>
            
          
!
            
              /*
 * Obnoxious.CSS Demo Site
 */

html {
  height: 100%;
}

body {
  height: 100%;
  margin: 0px;
}

.center {
  font-family: 'Montserrat', sans-serif;
  transform: translateY(-50%);
  text-align: center;
  position: fixed;
  margin: 0px;
  width: 100%;
  color: #222;
  z-index: 1;
  top: 50%;
}

.center h1 {
  font-size: 70px;
  position: relative;
  margin: 0px;
}

.center .description {
  font-family: monospace;
  line-height: 22px;
  font-size: 18px;
  width: 370px;
  margin: auto;
  margin-top: 10px;
  margin-bottom: 25px;
}

.select {
  display: inline-block;
  margin-right: 10px;
  position: relative;
}

select {
  transition: background-color 200ms ease;
  font-size: 14px;
  padding: 10px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-sizing: border-box;
  border-radius: 3px;
  font-family: monospace;
  padding-right: 30px;
  position: relative;
  outline: 0px;
  background: #fff;
  cursor: pointer;
}

.select:after {
  content: "▼";
  padding: 14px 8px;
  position: absolute;
  right: 13px;
  top: 0;
  z-index: 1;
  text-align: center;
  width: 10%;
  height: 100%;
  pointer-events: none;
  box-sizing: border-box;
  font-size: 9px;
}

button {
  transition: background-color 200ms ease;
  font-size: 14px;
  padding: 10px 12px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-sizing: border-box;
  border-radius: 3px;
  border: 1px solid #aaa;
  background: #fff;
  font-family: monospace;
  cursor: pointer;
  outline: 0px;
}

button:hover,
select:hover {
  background-color: #eee;
}

.center .links {
  padding-top: 60px;
  font-family: monospace;
  letter-spacing: 0.3px;
  font-style: italic;
  font-size: 14px;
}

.center .links a {
  text-decoration: none;
  margin-left: 10px;
  margin-right: 10px;
  color: #777;
}
    
.center .links a:hover {
  text-decoration: underline;
}

iframe {
  margin-left: 14px;
  margin-bottom: -5px;
}


@media (max-width: 900px) {

  .center h1 {
    font-size: 50px;
  }

  .center .links a, .center .links iframe {
    display: block;
    margin: auto;
    margin-bottom: 12px;
  }

  .divider {
    display: none;
  }
}

@media (max-width: 400px) {

  .center h1 {
    font-size: 26px;
  }

  .center .description {
    font-size: 14px;
    width: 100%;
    padding-left: 40px;
    padding-right: 40px;
    box-sizing: border-box;
  }

}

            
          
!
            
              (function() {

  var header    = document.querySelector('h1');
  var selectBox = document.querySelector('select');
  var runButton = document.querySelector('button');

  // On SelectBox Change
  selectBox.addEventListener('change', function() {
    triggerAnimation();
  })

  // On "run animation" button clicked
  runButton.addEventListener('click', function(e) {
    e.preventDefault();
    triggerAnimation();
  })

  function triggerAnimation() {

    var animation = selectBox.value;
    header.className = "";
    setTimeout(function() {
      header.className = "animated " + animation;
    }, 10);

  }

})();
            
          
!
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