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.

            
              @import url(https://fonts.googleapis.com/css?family=RobotoDraft:400);
@import url(https://fonts.googleapis.com/css?family=Roboto:400);
@import url(https://i.icomoon.io/public/temp/2ad30b9a5c/UntitledProject/style.css);
  
html {
  font-family: "Roboto Draft", Roboto, sans-serif;
  font-size: 14px;

  &:before {
    content: 'Pure CSS Webpage ';
    display: block;
    font-size: 1em;
    background: #3F51B5;
    color: #fff;
    padding: 1em 10px;
    
  }
  &:after {
    content: 
      'pure CSS webpage (without additional HTML) by Gregor Adams.\a'
      'Follow me on twitter (@GregorAdams) or CodePen (@pixelass)';
    display: block;
    white-space: pre;
    line-height: 1.5;
    font-size: 1em;
    padding: 10px;
  }
}
head {
  display: block;
  
  &:before {
    position: absolute;
    top: 1.5em;
    right: 10px;
    content: "\e600";
    display: block;
    font-size: 1em;
    font-family: 'icomoon';
    height: 3em;
    width: 3em;
    color: white;
    background: #FF4081;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100%;
    box-shadow: 0 3px 5px rgba(0,0,0,0.3);
    cursor: pointer;
  }
  &:after {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: white;
    width: 250px;
    box-shadow: 3px 0 4px rgba(0,0,0,0.2);
    display: block;
    font-size: 1em;
    padding: 10px;
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.3s;
    transition-delay: 1s;
    white-space: pre;
    line-height: 3em;

    content: 
      'Menu Link 1 \a'
      'Menu Link 2 \a'
      'Menu Link 3 \a'
      'Menu Link 4 \a'
      'Menu Link 5 \a';

  }
  &:hover {
    background: red;
    
    &:after {
      transform: translate3d(0, 0, 0);
      transition-delay: 0s;
    }
  }
}

body {
  margin: 0;
  padding: 10px;

  &:before {
    content: 'No additional markup needed';
    display: block;
    font-size: 2em;
    margin: 0.5em 0;
  }
  
  &:after {
    content: 'This page is built with CSS only. \a'
      'Look at the HTML section of this page. As you can surely see, it is empty.\a'
      'The only elements used are delivered by the browser itself. \a'
      'A browser delivers the following elements by default: \a'
      '\a'
      '  1. <html> \a'
      '  2. <head> \a'
      '  3. <body> \a'
      '\a'
      'furthermore we could use the <style> element which is needed to style the page\a'
      '\a'
      'This page features:\a'
      '\a'
      '  ● header \a'
      '  ● sidebar \a'
      '  ● menu-button \a'
      '     ◦ hover to activate the sidebar\a'
      '  ● content area \a'
      '  ● footer \a'
      '  ● unordered/ordered-list\a'
      '\a';
    display: block;
    font-size: 1em;
    white-space: pre;
  }
}
            
          
!
999px
Loading ..................

Console