cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <div class="paper-background">
  <span class="coffee-stain"></span>
  <input class="paper-name" name="name" placeholder="http://www.jontsang.ca" type="text">
  <input class="paper-date" name="date" placeholder="12/31/2015" type="text">
  <section class="paper-content">
<p>Hello Reddit!</p>
<br/>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vitae orci id dui congue volutpat. Phasellus eget sem ac eros congue porttitor. Nullam vehicula iaculis eros, vitae lacinia ante eleifend et. Phasellus elit tellus, pellentesque sit amet facilisis elementum, vulputate at justo. Nunc dapibus erat ac justo gravida, vitae vehicula purus congue. Aliquam id erat at tellus pretium suscipit. Quisque sit amet ultrices erat. Nam quis turpis ut leo condimentum consequat non id neque. Donec id massa neque. Proin rutrum sagittis enim nec sagittis.</p>
<p>Donec tristique mauris dolor, finibus posuere leo tristique ut. Phasellus tristique, nisi volutpat placerat aliquet, sem urna faucibus ex, in blandit nulla ligula ut arcu. Donec at tellus vel arcu elementum venenatis semper commodo enim. Aenean eget orci ut elit suscipit mattis. Proin dignissim dui sem, consectetur scelerisque augue tincidunt eu. Suspendisse rhoncus sem a metus fermentum efficitur. Duis feugiat metus eu arcu scelerisque, vitae accumsan dolor malesuada. Duis tincidunt quis dolor vitae tristique. Integer erat lectus, ultricies nec est et, ullamcorper vestibulum diam. Ut mauris ligula, tincidunt mollis dapibus porttitor, vestibulum id erat. Vivamus velit velit, tincidunt nec nisl ac, accumsan efficitur metus.</p>
  </section>
</div>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Architects+Daughter);

$base: 18.00000px !default;
$background: #fff;
$paper: #f9f9f9;

%shadow-z-1 {
  -webkit-box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.26);
  -moz-box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.26);
  box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.26);
}

%inset-z-1 {
  -webkit-box-shadow: inset 0px 2px 5px 0px rgba(0, 0, 0, 0.26);
-moz-box-shadow: inset 0px 2px 5px 0px rgba(0, 0, 0, 0.26);
box-shadow: inset 0px 2px 5px 0px rgba(0, 0, 0, 0.26);
}

@function em($pixels, $context: $base) {
  @if (unitless($pixels)) {
    $pixels: $pixels * 1px;
  }

  @if (unitless($context)) {
    $context: $context * 1px;
  }

  @return $pixels / $context * 1em;
}

$gutter: em(30) !default;
$fontsize: $base !default;
$lineheight: $fontsize + 6px;

body,
.content,
.paper-date,
.paper-name {
  font-family: 'Architects Daughter', cursive;
  font-size: $fontsize;
}

body {
  margin: 0 auto;
  padding: 30px;
  width: 960px;
  
  color: #333;
  
  font-weight: 300;
  letter-spacing: 1px;
  
  ::-moz-selection { /* Code for Firefox */
    color: #333;
    background: yellow;
  }

  ::selection {
      color: #333; 
      background: yellow;
  }
}

p {
  line-height: $lineheight;
  text-indent: $gutter;
}

.coffee-stain {
  content: " ";
  display: inline-block;
  
  position: absolute;
  bottom: -$lineheight;
  right: -$lineheight;
  z-index: 6;
  opacity: .35;
  
  width: 200px;
  height: 200px;
  
  background-image: url(https://openclipart.org/image/800px/svg_to_png/185884/coffeering.png);
  background-repeat: no-repeat;
  background-position: top right;
  background-size: 200px 200px;
}

.paper-background {
  
    @extend %shadow-z-1;
  
    display: block;
    float: left;
    position: relative;
    z-index: 1;
  
    margin: 0;
    padding-top: 75px;
  
    width: 100%;
    height: auto;
  
    background-color: $paper;
    
    overflow: hidden;
  
    &:before {
      @extend %inset-z-1;
      
      content: " ";
      display: inline-block;
      
      position: absolute;
      top: $lineheight*4;
      left: $lineheight;
      z-index: 3;
      
      width: $lineheight;
      height: $lineheight;
      
      background-color: $background;
      
      -webkit-border-radius: 50%;
      -moz-border-radius: 50%;
      border-radius: 50%;
    }
  
    &:after {
      content: " ";
      display: inline-block;

      position: absolute;
      top: 0;
      bottom: 0;
      left: $lineheight*4;
      z-index: 3;

      width: 4px;
      height: 100%;

      border-left: 4px double #fca1a1;
    }
}

.paper-content {
  position: relative;
  top: 0;
  left: 0;
  z-index: 2;
  
  padding: $lineheight*2 $lineheight*5 $lineheight;
  
  height: auto;
  
  background: repeating-linear-gradient(
    to bottom,
    #f9f9f9,
    #f9f9f9 $lineheight - 1px,
    #6BA2D8 1px,
    #f9f9f9
  );
  background-size: 100% $lineheight;
  
  line-height: $lineheight;
    
  &:before {
      @extend %inset-z-1;
      
      content: " ";
      display: inline-block;
      
      position: absolute;
      top: $lineheight*16;
      left: $lineheight;
      z-index: 3;
      
      width: $lineheight;
      height: $lineheight;
      
      background-color: $background;
      
      -webkit-border-radius: 50%;
      -moz-border-radius: 50%;
      border-radius: 50%;
  }
  
  &:after {
      content: " ";
      display: inline-block;
    
      position: absolute;
      top: -75px;
      bottom: 0;
      right: $lineheight*4;
      z-index: 4;

      width: 4px;
      height: 1000%;

      border-left: 1px solid #fca1a1;
    }
}

.paper-name,
.paper-date {
  position: absolute;
  z-index: 5;
  width: 300px;
  
  background-color: transparent;

  font-size: 20px;
  
  border: none;
  vertical-align: baseline;
  
  &:focus {
    outline: none;
  }
}
.paper-name {
  left: $lineheight*5;
}

.paper-date {
  right: $lineheight*5;
  z-index: 5;
  text-align: right;
}
            
          
!
999px
Loading ..................

Console