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.

            
              <div class="content">
  <h1 class="ribbon">Just a Rounded Ribbon</h1>
  <h2>Responsive? Resize the window.</h2>
  <p>Cupcake applicake jelly powder jelly-o tiramisu. Sweet roll marshmallow jujubes cheesecake I love I love brownie. I love gummies soufflé lemon drops wafer. Macaroon lollipop gummi bears gingerbread jelly-o pastry muffin. Tootsie roll powder biscuit I love cotton candy. I love cupcake marshmallow I love macaroon pastry danish.</p>
  <p>Lollipop I love chocolate liquorice soufflé. Croissant lollipop muffin I love sweet oat cake carrot cake. Macaroon gummi bears ice cream halvah. Pudding jelly beans sugar plum. Liquorice I love candy pudding soufflé sweet.</p>
  <p>Placeholder text from <a href="http://cupcakeipsum.com" target="_blank">cupcakeipsum.com</a></p>
</div>
            
          
!
            
              /*almost everything here is em based*/
@import url(https://fonts.googleapis.com/css?family=Crete+Round);

html{
  font-size:1em;
  background: #825582;
}

h1, h2 {
  font-family: 'Crete Round', serif;
}

a{
  color: #825582;
  text-decoration: none;
}

.content{
  background:#e6e2c8;
  width: 80%;
  max-width: 960px;
  min-height: 3.750em; 
  margin: 2em auto;
  padding: 1.250em;
  border-radius: 0.313em;
  box-shadow: 0 2px 5px 0 rgba(0,0,0,0.5);
  line-height: 1.5em;
  color: #292929;
}

.ribbon{
  position:relative;
  padding: 0 0.5em;
  font-size:2.000em;
  margin: 0 0 0 -0.625em;
  line-height: 1.875em;
  color: #e6e2c8;
  border-radius: 0 0.156em 0.156em 0;
  background: rgb(123, 159, 199);
  box-shadow: -1px 2px 3px rgba(0,0,0,0.5);
}

.ribbon:before, .ribbon:after{
  position:absolute;
  content: '';
  display: block;
}

.ribbon:before{
  width: 0.469em;
  height: 100%;
  padding: 0 0 0.438em;
  top:0;
  left: -0.469em;
  background:inherit;
  border-radius: 0.313em 0 0 0.313em;
}

.ribbon:after{
  width: 0.313em;
  height: 0.313em;
  background: rgba(0,0,0,0.35);
  bottom: -0.313em;
  left: -0.313em;
  border-radius: 0.313em 0 0 0.313em;
  box-shadow: inset -1px 2px 2px rgba(0,0,0,0.3);
}

@media (max-width: 600px) {
  
  body{
    font-size:0.875em;
  }
  
  .ribbon{
    line-height: 1.143em;
    padding: 0.5em;
  }
  
  .ribbon:before, .ribbon:after{
    font-size: 0.714em;
  }
  
}
            
          
!
            
              /*
change the background color of the .ribbon class
or
change the font size of the .content div
or
Resize the window to see how it behaves
*/
            
          
!
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