Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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

              
                main#main

  header
    h1
      img(src='http://apkestudio.com/wp-content/themes/apk-estudio-theme/img/logo-header.svg' alt='Logo')

    nav#navegacion
      ul
        li: a(href='#acerca' class='activo') Acerca
        li: a(href='#servicios') Servicios
        li: a(href='#portafolio') Portafolio
        li: a(href='#contacto') Contacto

   section#contenido
     article#acerca.bloque.visible
       h2 Acerca de mí
       p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin dignissim dolor vitae tellus elementum condimentum. Nullam fermentum ultrices lacus et luctus. Nulla facilisi. Pellentesque mattis consectetur dui sit amet sagittis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris cursus mollis ornare. Vestibulum est dolor, imperdiet ut faucibus cursus, aliquet varius enim. In venenatis eu eros nec suscipit. Sed rutrum mauris dui, at vehicula elit porta sit amet. Praesent non justo ac est rutrum rutrum non hendrerit justo. Aliquam erat volutpat. Vestibulum feugiat eget massa ac condimentum.

     article#servicios.bloque
       h2 Servicios creativos
       p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin dignissim dolor vitae tellus elementum condimentum. Nullam fermentum ultrices lacus et luctus. Nulla facilisi. Pellentesque mattis consectetur dui sit amet sagittis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris cursus mollis ornare. Vestibulum est dolor, imperdiet ut faucibus cursus, aliquet varius enim. In venenatis eu eros nec suscipit. Sed rutrum mauris dui, at vehicula elit porta sit amet. Praesent non justo ac est rutrum rutrum non hendrerit justo. Aliquam erat volutpat. Vestibulum feugiat eget massa ac condimentum.

     article#portafolio.bloque
       h2 Portafolio de trabajos
       p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin dignissim dolor vitae tellus elementum condimentum. Nullam fermentum ultrices lacus et luctus. Nulla facilisi. Pellentesque mattis consectetur dui sit amet sagittis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris cursus mollis ornare. Vestibulum est dolor, imperdiet ut faucibus cursus, aliquet varius enim. In venenatis eu eros nec suscipit. Sed rutrum mauris dui, at vehicula elit porta sit amet. Praesent non justo ac est rutrum rutrum non hendrerit justo. Aliquam erat volutpat. Vestibulum feugiat eget massa ac condimentum.

     article#contacto.bloque
       h2 Contáctame
       p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin dignissim dolor vitae tellus elementum condimentum. Nullam fermentum ultrices lacus et luctus. Nulla facilisi. Pellentesque mattis consectetur dui sit amet sagittis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris cursus mollis ornare. Vestibulum est dolor, imperdiet ut faucibus cursus, aliquet varius enim. In venenatis eu eros nec suscipit. Sed rutrum mauris dui, at vehicula elit porta sit amet. Praesent non justo ac est rutrum rutrum non hendrerit justo. Aliquam erat volutpat. Vestibulum feugiat eget massa ac condimentum.
              
            
!

CSS

              
                @verde: #94c01f;
@gris: #f4f4f4;

body {
  font-family: georgia;
  line-height: 1.6em;
}

h1 {
  font-size: 1em;
  margin: 2em 0;
}

h2 {
  text-align: center;
  font-weight: 300;
  text-transform: uppercase;
  margin: 0 0 2em 0;
  
  &::before,
  &::after {
    content: ' – '
  }
}

#main {
  max-width: 900px;
  width: 90%;
  margin: 2em auto;
  background: white;
}

header {
  text-align: center;
}

nav {
  border-top: solid 2px darken(@gris, 20%);
  padding-top: 1em;
  
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
    
    li {
      display: inline-block;
      
      a {
        display: block;
        color: @verde;
        padding: 1em;
        text-decoration: none;
        text-transform: uppercase;
        font-size: 0.9em;
        border-radius: 0.3em;
        
        &:hover {
          background: @gris;
          color: black;
        }
        
        &.activo {
          background: @verde;
          color: white;
          
          //Animación
          animation: enlace-menu 500ms ease-in-out forwards;
        }
      }
    }
  }
}

#contenido {
  margin-top: 1em;
  border-top: solid 2px darken(@gris, 20%);
  perspective: 1000px;
}

.bloque {
  background: @gris;
  padding: 3em 2em;
  display: none;
  
  p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  
  &.visible {
    display: block;
    
    //Animacion
    animation: bloque-visible 500ms ease-in-out forwards;
    transform-origin: top center;
  }
}

@keyframes bloque-visible {
  
  0% {
    opacity: 0;
    transform: rotateX(-90deg);
  }
  
  60% {
    transform: rotateX(20deg);
  }
  
  75% {
    transform: rotateX(-10deg);
  }
  
  90% {
    transform: rotateX(5deg);
  }
  
  100% {
    opacity: 1;
    transform: rotateX(0deg);
  }
  
  
}



@keyframes enlace-menu {
  
  0% {
    transform: scale(0.8);
  }
  
  70% {
    transform: scale(1.1);
  }
  
  85% {
    transform: scale(0.95);
  }

  100% {
    transform: scale(1);
  }
  
  
}




              
            
!

JS

              
                jQuery('document').ready(function($){
  
  var bloques = $('.bloque'),
      enlaces = $('#navegacion').find('a');
  
  enlaces.click(function(e){
    
    e.preventDefault();
    
    var hash = $(this).attr('href');
    
    bloques
      .filter(hash)
      .addClass('visible')
      .siblings()
      .removeClass('visible');
    
    enlaces
      .removeClass('activo');
    
    $(this)
      .addClass('activo');
    
  });
  
});
              
            
!
999px

Console