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

              
                <div class="container">
  <div class="col-xs-12">
    <h1 class="text-center">Dobby The House Elf</h1>
    <h2 class="text-center"><em>Dobby <s>is</s> was a free elf!<em></h2>
    <div id="img-contain">
      <img class="img thumbnail" src="http://blog.mugglenet.com/wp-content/uploads/2014/04/Dobby-Harry-Potter-Deathly-Hallows-Wallpaper.jpg" alt="Dobbying a badass">
      <div class="caption text-center" id="img-cap">
        <h4>Dobby the Badass House Elf saving the day as usual</h4>
      </div>
    </div>
      
      <div class="col-xs-12">
        <h3 class="text-center">Sir Dobby's stats:</h3>
        <ul class="Dobby">
          <li><b>Height</b>: 3ft 6" (1.06m)</li><br>
          <li><strong>Eyes</strong>: Large and Green</li><br>
          <li><strong>Ears</strong>: Big, floppy, and sexy as <b>fuck</b>.</li><br>
          <li><strong>Clothing</strong>: Jumpers, scarves, socks. (His favourite is socks!) </li><br>
          
          <li><strong>Personality</strong>: Brave loyal ahnd caring as fuck.</li><br>
          <li><strong>Occupation</strong>: DOBBY IS A FREE ELF (Previously a great house elf!) </li><br>
          <li><strong>Extra</strong>: A bit tricksy, but not hobbit tricksy </li><br>
        </ul>
      </div>
      <div class="col-xs-8 center"><a href="http://harrypotter.wikia.com/wiki/Dobby">Interested in learning more about Dobby and his exploits?</div>
  </div>
              
            
!

CSS

              
                .container {
  background-color: #eee;
  height: 100%;
  font-family: Helvetica Neue;
  font-size: 18px;
  margin: auto;
  width: 800px;
  top: 0;
}
h1{
  font-size: 60px;
}
.caption{
  height: 20px;
  background-color: #ccc;
  z-index: 0;
  top: 0;
  margin: -12px auto 0;
  width: 540px;
  border-radius: 0px 0 20px 20px;
  display: none;
  -webkit-transition-duration: 0.6s;
  transition-duration: 0.6s;
}
.img {
  width: 540px;
  margin: auto;
  bottom: 0px;
  border: none;
  background-color: #ccc;
  cursor: pointer;
  -webkit-transition-duration: 0.6s;
  transition-duration: 0.6s;
}
.img:hover {
  width: 540px;
  margin: auto;
  bottom: 0px;
  border: none;
  background-color: #ccc;
  cursor: initial;
  -ms-transform: scale(1.05, 1.05); 
  -webkit-transform: scale(1.05, 1.05); 
  transform: scale(1.05, 1.05); 
}
.Dobby{
  width: 540px;
  margin: auto;
  display: block;
  list-style-type: square
}
.center{
  margin-left: 120px;
  font-size: 30px;
  text-align: center;
}
              
            
!

JS

              
                $("document").ready(function() {
  $(".img").click(function() {
    $(".caption").fadeIn();
  });
});
              
            
!
999px

Console