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.

            
              <ul class="bookshelf">
    <li class="book rotated-text"><a class="book__inner rotated-text__inner" href="#book">The Idiot</a></li>
    <li class="book rotated-text"><a class="book__inner rotated-text__inner" href="#book">The Little Prince</a></li>
    <li class="book rotated-text"><a class="book__inner rotated-text__inner" href="#book">Roadside Picnic</a></li>
    <li class="book rotated-text"><a class="book__inner rotated-text__inner" href="#book">Flowers for Algernon</a></li>
    <li class="book rotated-text"><a class="book__inner rotated-text__inner" href="#book">A Book of Five Rings</a></li>
    <li class="book rotated-text"><a class="book__inner rotated-text__inner" href="#book">The Glass Bead Game</a></li>
    <li class="book rotated-text" title="42!"><a class="book__inner rotated-text__inner" href="#book">The Hitchhiker's Guide to the Galaxy</a></li>
    <li class="book rotated-text"><a class="book__inner rotated-text__inner" href="#book">The Hobbit</a></li>
    <li class="book rotated-text"><a class="book__inner rotated-text__inner" href="#book">One Flew Over the Cuckoo's Nest</a></li>
    <li class="book rotated-text"><a class="book__inner rotated-text__inner" href="#book">1984</a></li>
    <li class="book rotated-text"><a class="book__inner rotated-text__inner" href="#book">Mother Night</a></li>
    <li class="book rotated-text"><a class="book__inner rotated-text__inner" href="#book">Speaker for the Dead</a></li>
    <li class="book rotated-text"><a class="book__inner rotated-text__inner" href="#book">The Day of the Triffids</a></li>
</ul>
            
          
!
            
              .rotated-text {
    display: inline-block;
    overflow: hidden;
    width: 2.5em;
    line-height: 1.5;
}
.rotated-text__inner {
    display: inline-block;
    white-space: nowrap;
    -webkit-transform: translate(0,100%) rotate(-90deg);
       -moz-transform: translate(0,100%) rotate(-90deg);
        -ms-transform: translate(0,100%) rotate(-90deg);
         -o-transform: translate(0,100%) rotate(-90deg);
            transform: translate(0,100%) rotate(-90deg);
    -webkit-transform-origin: 0 0;
       -moz-transform-origin: 0 0;
        -ms-transform-origin: 0 0;
         -o-transform-origin: 0 0;
            transform-origin: 0 0;
}
/* This element stretches the parent to be square
   by using the mechanics of vertical margins  */
.rotated-text__inner:before {
    content: "";
    float: left;
    margin-top: 100%;
}
.bookshelf {
    padding: 0;
    margin: 0;
    font-size: 0.8em;
}
.book {
    padding: 1em 0.5em;
    vertical-align: bottom;
    list-style: none;
    -webkit-box-shadow: inset 0 0 0 1px #000;
            box-shadow: inset 0 0 0 1px #000;
}
.book:before {
    display: none;
}
.book__inner {
    text-decoration: none;
    vertical-align: middle;
    text-align: center;
    min-width: 8em;
    padding: 0;
    color: #000;
    text-shadow: none !important;
}
            
          
!
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