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.

            
              / Easter Hues, according to http://design-seeds.com/index.php/home/entry/easter-hues1

- @hexcodes = ['#bed9d2', '#3f8488', '#e45f69', '#fa87a2', '#eac27d', '#ebe3a0']
- @hexcodes.each do |a|
  .a
    %p
      #{a}
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Montserrat)

$colors: (#bed9d2, #3f8488, #e45f69, #fa87a2, #eac27d, #ebe3a0)

::selection
  background-color: black

html, body
  width: 100%
  height: 100%
.a
  position: relative
  float: left
  height: 100%
  width: 16.66666666666667%
  cursor: crosshair
  transition: width .15s ease-in-out
  & p
    position: absolute
    display: none
    top: 50%
    left: 50%
    transform: translate(-50%, -50%)
    padding: 0
    margin: 0
    color: white
    font:
      family: Montserrat
      weight: 400
      size: 30px
    text-transform: uppercase

@for $i from 0 to 6
  .a:nth-child(#{$i+1})
    background: nth($colors, $i+1)
    
.hover
  width: 30%
.unhover
  width: 14%
.click
  width: 100%
.unclick
  width: 0%
            
          
!
            
              $(".a").hover(function() {
    $(this).addClass("hover");
    $(this).siblings().addClass("unhover");
  }, function() {
    $(this).removeClass("hover");
    $(this).siblings().removeClass("unhover");
  }
);

$(".a").click(function(){
  $(this).toggleClass("click");
  $(this).siblings().toggleClass("unclick");
  $(this).children("p").fadeToggle(150);
}).children().click(function(e) {
  return false;
});

setTimeout(function(){
  $('.a').not('.a:nth-child(3)').addClass('unclick');
  $('.a:nth-child(3)').addClass('click');
  $('.a:nth-child(3)').children("p").fadeToggle(150);
},700);
setTimeout(function(){
  $('.a').not('.a:nth-child(3)').removeClass('unclick');
  $('.a:nth-child(3)').removeClass('click');
  $('.a:nth-child(3)').children("p").fadeToggle(150);
},1700);
            
          
!
999px
Loading ..................

Console