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 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.

HTML

              
                <div class="cover">
  <div class="imgBox">
    <img src="https://images-na.ssl-images-amazon.com/images/I/41bgiGplMlL._SX301_BO1,204,203,200_.jpg">
  </div>
  <div class="frontPage">
    <h2>
      Animal Farm <br/>
      A Fairy Story by George Orwell <br/>
     <hr class="hr">
      I
     <hr class="hr">
    </h2>
<p>
    Mr. Jones, of the Manor Farm, had locked the hen-houses for the night, but was too drunk to remember to shut the popholes. With the ring of light from his lantern dancing from side to side, he lurched across the yard, kicked off his boots at the back door, drew himself a last glass of beer from the barrel in the scullery, and made his way up to bed, where Mrs. Jones was already snoring.
</p>
<p>
  As soon as the light in the bedroom went out there was a stirring and a fluttering all through the farm buildings. Word had gone round during the day that old Major, the prize Middle White boar, had had a strange dream on the previous night and wished to communicate it to the other animals. It had been agreed that they should all meet in the big barn as soon as Mr. Jones was safely out of the way. Old Major (so he was always called, though the name under which he had been exhibited was Willingdon Beauty) was so highly regarded on the farm that everyone was quite ready to lose an hour's sleep in order to hear what he had to say.
</p>
<p>
  At one end of the big barn, on a sort of raised platform, Major was already ensconced on his bed of straw, under a lantern which hung from a beam. He was twelve years old and had lately grown rather stout, but he was still a majestic-looking pig, with a wise and benevolent appearance in spite of the fact that his tushes had never been cut. Before long the other animals began to arrive and make themselves comfortable after their different fashions. First came the three dogs, Bluebell, Jessie, and Pincher, and then the pigs, who settled down in the straw immediately in front of the platform. The hens perched themselves on the window-sills, the pigeons fluttered up to the rafters, the sheep and cows lay down behind the pigs and began to chew the cud. The two cart-horses, Boxer and Clover, came in together, walking very slowly and setting down their vast hairy hoofs with great care lest there should be some small animal concealed in the straw. Clover was a stout motherly mare approaching middle life, who had never quite got her figure back after her fourth foal. Boxer was an enormous beast, nearly eighteen hands high, and as strong as any two ordinary horses put together. A white stripe down his nose gave him a somewhat stupid appearance, and in fact he was not of first-rate intelligence, but he was universally respected for his steadiness of character and tremendous powers of work. After the horses came Muriel, the white goat, and Benjamin, the donkey. Benjamin was the oldest animal on the farm, and the worst tempered. He seldom talked, and when he did, it was usually to make some cynical remark–for instance, he would say that God had given him a tail to keep the flies off, but that he would sooner have had no tail and no flies. Alone among the animals on the farm he never laughed. If asked why, he would say that he saw nothing to laugh at. Nevertheless, without openly admitting it, he was devoted to Boxer; the two of them usually spent their Sundays together in the small paddock beyond the orchard, grazing side by side and never speaking.
</p>
    <p class="pagenumber">1</p>
  </div>
</div>
              
            
!

CSS

              
                body {
  margin:0;
  padding:0;
  background: #303030;
}
.cover {
  position:absolute;
  left:50%;
  top:50%;
  transform-style:preserve-3d;
  transform:translate(-50%,-50%) perspective(2000px);
  width:300px;
  height:400px;
  background:#fff;
  box-shadow: inset 300px 0 50px rgba(0,0,0,.5), 0 20px 100px rgba(0,0,0,.5);
  transition: 1.5s;
}
.cover:hover {
  transform: translate(-50%, -50%) perspective(2000px) rotate(-10deg);
  box-shadow: inset 20px 0 50px rgba(0,0,0,.5), 0 10px 100px rgba(0,0,0,.5);
}
.cover:before {
  content:'';
  position:absolute;
  top:-5px;
  left:0;
  width:100%;
  height:5px;
  background: #323a3c;
  transform-origin: bottom;
  transform: skewX(-45deg);
}
.cover:after {
  content:'';
  position: absolute;
  top:-5px;
  right:-5px;
  width:5px;
  height:101%;
  background: #323a3c;
  transform-origin: left;
  transform: skeyY(-45deg);
  z-index:1;
}
img {
  overflow:hidden;
  width:300px;
  height:400px;
}
.cover .imgBox {
  overflow:hidden;
  width: 100%;
  height: 100%;
  position:relative;
  transform-origin: left;
  transition: 2s cubic-bezier(.27,1.03,.75,.43);
  z-index:1;
}

.cover:hover .imgBox {
  transform: rotateY(-175deg);
}

.cover .frontPage {
  position:absolute;
  top:0;
  left:0;
  box-sizing: border-box;
  padding:20px;
}
h2 p {
  padding:0;
  margin:0;
}

h2 {
  font-size:12px;
  line-height:16px;
  text-align:center;
  font-weight:bold;
}

.pagenumber {
  text-align:right;
}

p {
  text-align:justify;
  font-size:6px;
}
              
            
!

JS

              
                
              
            
!
999px

Console