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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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="words">

  <div class="word">
    <span class="fold non">F</span><span class="fold right sym">O</span><span class="fold non">L</span><span class="fold down sym">D</span>
  </div>
  <h3>v1.0</h3>
  <p>Inspired by the FOLD logo designed by <a href="http://dribbble.com/shots/3018567-Fold-Logo" target="_blank">Cat Noone</a>.</p>

  <div class="word">
    <span class="fold down sym">B</span><span class="fold right sym">O</span><span class="fold right sym">O</span><span class="fold right">M</span>
  </div>


  <div class="word">
    <span class="fold non">?</span><span class="fold down">.</span><span class="fold right sym">!</span><span class="fold right sym">*</span>
  </div>
  <h3>coming in v2.0:</h3>
  <p>responsive shadows/sizes; add specific classes for punctuation; safari/other browser support (currently optimized for chrome)</p>
</div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Montserrat');
$background: #c4223c;
$background-rgba: rgba(198,
30,
56,
.8);
$fontcolor: #c4223c;
$dark-fontcolor: #862937;
// still working on making all of the shadows scale properly when you change the font size.
$fontsize:170px;
$black: rgba(56,
56,
56,
.7);
// aspirations for animation
@mixin animation($animate,
$time) {
  -webkit-animation: $animate $time;
  -moz-animation: $animate $time;
  -ms-animation: $animate $time;
  -o-animation: $animate $time;
  animation: $animate $time;
}

@mixin rotateMove($deg,
$x,
$y) {
  -webkit-transform: rotate($deg) translate($x, $y);
  -moz-transform: rotate($deg) translate($x, $y);
  -ms-transform: rotate($deg) translate($x, $y);
  -o-transform: rotate($deg) translate($x, $y);
  transform: rotate($deg) translate($x, $y);
}

body {
  background-color: $background;
}

h3,
p,
a:link,
a:visited,
a:active {
  color: $dark-fontcolor;
  font-weight: 100;
  text-decoration: none;
  text-align: center;
  font-size: .9em;
  margin: .1em auto;
  max-width:80%;
}

h3 {
  font-size: 1.2em;
}

a:hover {
  text-decoration: underline;
}

.words {
  font-family: 'Montserrat', sans-serif;
  color: $background;
  margin: 20px auto;
  display: table;
  overflow: hidden;
  opacity:0;
  @include animation(appear, 2s);
  -webkit-animation-fill-mode:forwards;
}

.word {
  display: table;
  margin: -.3em auto;
}

.fold {
  position: relative;
  font-size: $fontsize;
  font-weight: 600;
}

.letter {
  position: relative;
  z-index: 10;
  padding: 0 .05em;
  background-color: $black;
  color: transparent;
  text-shadow: .1rem 0rem .4rem $background-rgba;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  background-clip: text;
}

// "sym" is short for symmetrical-- used when the letter is a mirror image
.down.sym {
  .letter:after {
    content: '';
    display: block;
    position: absolute;
    z-index: 0;
    height: 50%;
    width: 100%;
    bottom: 0;
    left: 0;
    background-color: $background;
  }
}

.right.sym {
  .letter:after {
    content: '';
    display: block;
    position: absolute;
    z-index: 0;
    height: 100%;
    width: 50%;
    bottom: 0;
    right: 0;
    background-color: $background;
  }
}

.folded {
  color: $fontcolor;
  font-weight: 600;
  position: absolute;
  overflow: hidden;
  padding: 0 .05em;
  z-index: 3000;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  background-clip: text;
}

.dropshadow {
  color: $fontcolor;
  position: absolute;
  overflow: hidden;
  z-index: 100;
  padding: 0 .05em;
}

.down {
  .folded {
    transform: rotateX(180deg);
    bottom: -.004em;
    left: 0;
    height: 51%;
    background: -webkit-linear-gradient(70deg, $fontcolor 30%, #a0182c 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-transition-timing-function: ease-in-out;
    &:after {
      content: '';
      display: block;
      position: absolute;
      top: -1.7rem;
      left: 0rem;
      width: 100%;
      height: 135%;
      box-shadow: inset -1.9rem 0rem 1.6rem $background;
      transform: rotate(90deg);
      z-index: 4000;
    }
  }
  .dropshadow {
    transform: rotateX(180deg);
    // font-size:.995em;
    bottom: -.005em;
    left: 0;
    height: 51%;
    text-shadow: 0rem -.15rem .7rem $black;
  }
  &:hover {
    // .folded{
    //   -webkit-transition-timing-function: ease-in-out;
    //   @include animation(rotateGrow, 3s);
    //   -webkit-animation-fill-mode:forwards;
    //   &:after{
    //     height:0;
    //     width:0;
    //   }
    // }
  }
}

.right {
  .folded {
    transform: rotateY(180deg);
    top: 0;
    right: 0;
    width: 40%;
    z-index: 3000;
    background: -webkit-linear-gradient(180deg, $fontcolor 45%, #a0182c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    &:after {
      content: '';
      display: block;
      position: absolute;
      top: -1rem;
      right: 0px;
      width: 110%;
      height: 130%;
      box-shadow: inset -.8rem 0rem .9rem $background;
    }
  }
  .dropshadow {
    transform: rotateY(180deg);
    top: 0;
    right: 0;
    width: 40%;
    text-shadow: -0.15rem .05rem .7rem $black;
  }
}

// "non" stands for nonsymmetric
.non {
  position: relative;
  .letter {
    text-shadow: 0rem .05rem .7rem $black;
  }
  .folded {
    // transform: rotateY(180deg); 
    position: absolute;
    left: 0;
    z-index: 400;
    width: 1.91rem;
    padding: 0 .05em;
    background-color: $black;
    color: transparent;
    text-shadow: .1rem 0rem .4rem $background-rgba;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
  }
  .dropshadow {
    // transform: rotateY(180deg); 
    top: 0;
    left: 0;
    width: 100%;
    background: -webkit-linear-gradient(0deg, $fontcolor 40%, #a0182c 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    &:after {
      transform: rotateY(180deg);
      content: '';
      display: block;
      position: absolute;
      bottom: 15%;
      right: 0;
      width: 100%;
      height: 110%;
      // box-shadow: inset -.8rem 0rem .9rem $background;
      box-shadow: inset -3.65rem 0rem .9rem $background;
      // background-color:#000;
    }
  }
}

@-webkit-keyframes rotateGrow {
  0% {
    transform: rotateX(180deg);
    height: 50%;
  }
  50% {
    transform: rotateX(180deg) rotate(40deg) translate(1.5rem, 2rem);
    height: 60%;
  }
  100% {
    transform: rotateX(180deg) rotate(80deg) translate(2.5rem, 2rem);
    height: 100%;
  }
}

@keyframes down {
  0%,
  30% {
    @include rotateMove(135deg,
    .8em,
    -.8em);
  }
  70% {
    @include rotateMove(135deg,
    0em,
    0em);
  }
  100% {
    @include rotateMove(135deg,
    .8em,
    -.8em);
  }
}

@-webkit-keyframes appear {
  0% {opacity: 0;}
  50% { opacity:0;}
  100% {opacity:1;}
}
            
          
!
            
              $(".fold").each(function(){
  var folded = $(this).text();
  
  $(this).html('<span class="letter">'+folded+'</span><span class="folded">'+folded+'</span><span class="dropshadow">'+folded+'</span>');
});


            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console