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

              
                <!-- Polaroid Frame on Images by masmalven.com -->
<h1>Single Image</h1>
<div id="polaroid">
  <figure>
    <img src="https://4.bp.blogspot.com/-sTwXnTVk8L8/XBY9G7VlBII/AAAAAAAAG_w/alIfdUrZqU4oslH96bzbshnu7FR6E4WWACLcBGAs/s600/cat-3846780_1280.jpg" alt="This cat is so cute" title="This cat is so cute"/>
    <figcaption>This cat is so cute</figcaption>
  </figure>
</div>
<br/><br/>
<h1>Multiple Images</h1>
<div id="polaroid">
  <figure>
    <img src="https://4.bp.blogspot.com/-sTwXnTVk8L8/XBY9G7VlBII/AAAAAAAAG_w/alIfdUrZqU4oslH96bzbshnu7FR6E4WWACLcBGAs/s250/cat-3846780_1280.jpg" alt="This cat is so cute" title="This cat is so cute"/>
    <figcaption>This cat is so cute</figcaption>
  </figure>
  <figure>
    <img src="https://1.bp.blogspot.com/-DI7zmCmceHs/XBY9G7-N1lI/AAAAAAAAG_0/Us-KcjUzSIE4u0YSWxe_6FgiVz3BH55MQCLcBGAs/s250/grimace-388987_1280.jpg" alt="You are so funny!" title="You are so funny!"/>
    <figcaption>You are so funny </figcaption>
  </figure>
  <figure>
    <img src="https://2.bp.blogspot.com/-6tJBGSg9aPw/W68kNOiq0zI/AAAAAAAAGbc/O75Yv2U-DnoCEtrWeOPeDfduquQzr_C7ACPcBGAYYCw/s250/Fiksioner%2B01.jpg" alt="Be happy :)" title="Be happy :)"/>
    <figcaption>Be happy :) </figcaption>
  </figure>
  <figure>
    <img src="https://1.bp.blogspot.com/-Y1-qTfoRlrU/W68o92NKUyI/AAAAAAAAGb4/2fKXpiRnMDMlWt2APz7Gbxsqac6dvAc5ACLcBGAs/s250/Fiksioner%2B04.jpg" alt="My camera" title="My camera"/>
    <figcaption>My camera</figcaption>
  </figure>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Reenie+Beanie');

BODY {
  background-color:#eee;
  padding:30px;
  margin:auto;
  font: normal 16px Arial, sans-serif;
}

/* Polaroid Frame on Images by masmalven.com */
figure, figcaption {
display: block;
}
#polaroid{
width:100%;
padding:0px 10px;
margin:auto;
text-align: center;
}
#polaroid img{
max-width: 100%;
width: 100%;
height: auto;
}
#polaroid figure{
position:relative;
width: auto;
max-width: 600px; /* Lebar maksimal gambar */
margin: 20px auto 0px;
padding: 6px 8px 10px 8px;
display:inline-block;
-webkit-box-shadow: 4px 4px 8px -4px rgba(0, 0, 0, .75);
-moz-box-shadow: 4px 4px 8px -4px rgba(0, 0, 0, .75);
box-shadow: 4px 4px 8px -4px rgba(0, 0, 0, .75);
background-color: #eee6d8;
-webkit-transform:rotate(-1deg);
-moz-transform: rotate(-1deg);
-o-transform: rotate(-1deg);
-ms-transform: rotate(-1deg);
transform: rotate(-1deg);
-webkit-backface-visibility:hidden;
}
#polaroid figure:nth-child(even) {
margin:20px 18px 20px 25px;
-webkit-transform:rotate(2deg);
-moz-transform: rotate(2deg);
-o-transform: rotate(2deg);
-ms-transform: rotate(2deg);
transform: rotate(2deg);
-webkit-backface-visibility:hidden;
-webkit-box-shadow: 4px 4px 8px -4px rgba(0, 0, 0, .75);
-moz-box-shadow: 4px 4px 8px -4px rgba(0, 0, 0, .75);
box-shadow: -4px 4px 8px -4px rgba(0, 0, 0, .75);
}
#polaroid figure:before {
content: '';
display: block;
position: absolute;
left: 5px;
top: -10px;
width: 75px;
height: 25px;
z-index: 1;
background-color: rgba(222,220,198,0.7);
-webkit-transform: rotate(-12deg);
-moz-transform: rotate(-12deg);
-o-transform: rotate(-12deg);
-ms-transform: rotate(-12deg);
}
#polaroid figure:nth-child(even):before {
left:unset;
right:10px;
top:-10px;
width: 55px;
height: 25px;
z-index: 1;
-webkit-transform: rotate(12deg);
-moz-transform: rotate(12deg);
-o-transform: rotate(12deg);
-ms-transform: rotate(12deg);
}
#polaroid figcaption{
text-align:center;
font-family: 'Reenie Beanie', cursive;
font-size:1.75em;
color:#454f40;
letter-spacing:0.09em;
margin-top:10px;
}
              
            
!

JS

              
                
              
            
!
999px

Console