css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <header>
  <h1>Tycho Album Artwork (with CSS Scroll Snap)</h1>
  <p>All designs based on Scott Hansen's <a href="http://blog.iso50.com/34853/epoch-artwork-lineage/">blog post</a> outlining the design process for Tycho's Epoch album artwork. This only works in Firefox for now, but then you'd also have to enable <code>layout.css.clip-path-shapes.enabled</code> from <code>about:config</code> for the trapezoid to show up.</p>
</header>
<main>
  <section>
    <div class="o-album c-awake">
      <div class="o-logo o-logo-basic"></div>
    </div>
    <p>Awake (2014)</p>
  </section>

  <section>
    <div class="o-album c-montana">
      <div class="o-logo o-logo-basic"></div>
    </div>
    <p>Montana Single (2014)</p>
  </section>

  <section>
    <div class="o-album c-division">
      <div class="c-division__inner-1">
      </div>
      <div class="c-division__inner-2">
      </div>
      <div class="o-logo o-logo-alt"></div>
    </div>
    <p>First single from Epoch: Division (2016)</p>
  </section>

  <section>
    <div class="o-album c-epoch"></div>
    <p>Epoch (2016)</p>
  </section>
</main>
            
          
!
            
              body {
  text-align: center;
  height: 100vh;
  margin: 0;
  padding: 0;
  background: #000;
  color: #fff;
}

header {
  max-width: 45em;
  margin: 0 auto 0.5em;
  padding-top: 0.5em;
}

main {
  width: 100vw;
  height: 75vmin;
  white-space: nowrap;
  overflow-y: hidden;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: mandatory;
}

section {
  display: inline-block;
  width: 100%;
  height: 100%;
  scroll-snap-coordinate: 0 0;
}

h1 {
  font-size: calc(2vmin + 1em);
  margin: 0 0 0.5em;
}

p {
  flex: 1 0 100%;
  margin: 0 0 0.75vmin;
}

a {
  color: #f2af29;
}

.o-album {
  width: 65vmin;
  height: 65vmin;
  position: relative;
  margin: 0.25em auto;
}

.o-logo {
  border-radius: 50%;
  height: 1px;
  width: 1px;
  position: absolute;
}

.o-logo-basic {
  bottom: 10%;
  left: 50%;
  box-shadow: -6vmin 0 0 0.5vmin #47473f, -4vmin 0 0 0.5vmin #47473f, -2vmin 0 0 0.5vmin #47473f, 0 0 0 0.5vmin #47473f, 4vmin 0 0 0.5vmin #47473f, -6vmin 2vmin 0 0.5vmin #47473f, -4vmin 2vmin 0 0.5vmin #47473f, 0 2vmin 0 0.5vmin #47473f, 2vmin 2vmin 0 0.5vmin #47473f, 4vmin 2vmin 0 0.5vmin #47473f, 6vmin 2vmin 0 0.5vmin #47473f;
}

.o-logo-alt {
  right: 15%;
  bottom: 35%;
  transform: rotate(-45deg);
  box-shadow: -6vmin 0 0 0.5vmin #3d90b2, -4vmin 0 0 0.5vmin #3d90b2, -2vmin 0 0 0.5vmin #3d90b2, 0 0 0 0.5vmin #3d90b2, 4vmin 0 0 0.5vmin #3d90b2, -6vmin 2vmin 0 0.5vmin #3d90b2, -4vmin 2vmin 0 0.5vmin #3d90b2, 0 2vmin 0 0.5vmin #3d90b2, 2vmin 2vmin 0 0.5vmin #3d90b2, 4vmin 2vmin 0 0.5vmin #3d90b2, 6vmin 2vmin 0 0.5vmin #3d90b2;
}

.c-awake {
  background: #dad9c8;
}

.c-awake:before {
  display: block;
  content: '';
  width: 50%;
  height: 50%;
  background: linear-gradient(to bottom, #d18462 0%, #d18462 14%, #d2796a 15%, #d2796a 28%, #b56863 29%, #b56863 42%, #cf7486 43%, #cf7486 51%, #a9627c 52%, #a9627c 63%, #a16d8d 64%, #a16d8d 73%, #766d86 74%, #766d86 83%, #313d52 84%, #313d52 100%);
  border-radius: 50%;
  position: absolute;
  top: 20%;
  left: 25%;
}

.c-montana {
  background: #dad9c8;
}

.c-montana:before {
  display: block;
  content: '';
  position: absolute;
  top: 20%;
  left: 7.5%;
  width: 85%;
  height: 50%;
  clip-path: polygon(30% 0%, 70% 0%, 100% 100%, 0% 100%);
  background: linear-gradient(63deg, #32404c 0%, #32404c 46%, #746f85 46%, #746f85 50.5%, #9c708c 50.5%, #9c708c 55%, #a4657a 55%, #a4657a 59.5%, #cc7484 59.5%, #cc7484 64%, #b4695e 64%, #b4695e 71%, #ce7966 71%, #ce7966 100%);
}

.c-division {
  background: linear-gradient(45deg, #a45044 0%, #a45044 50%, #3d90b2 50%, #3d90b2 100%);
}

.c-division:before {
  position: absolute;
  display: block;
  height: 40%;
  width: 40%;
  content: '';
  background: #1e292f;
  border-radius: 50%;
  right: 8.8%;
  top: 8.8%;
}

.c-division:after {
  position: absolute;
  display: block;
  height: 12.2%;
  width: 12.2%;
  content: '';
  background: #1e292f;
  border-radius: 50%;
  left: 31.1%;
  bottom: 31.1%;
}

.c-division__inner-1 {
  border-top: 18.75vmin solid transparent;
  border-bottom: 18.75vmin solid transparent;
  border-left: 18.75vmin solid #1e292f;
}

.c-division__inner-2 {
  position: absolute;
  right: 0;
  bottom: 0;
  border-top: 18.75vmin solid transparent;
  border-bottom: 18.75vmin solid transparent;
  border-right: 18.75vmin solid #1e292f;
}

.c-epoch {
  background: #ab4334;
}

.c-epoch:before {
  display: block;
  content: '';
  position: absolute;
  top: 31%;
  left: 42.2%;
  border-radius: 50%;
  width: 14.6%;
  height: 14.6%;
  background: #e1e2d3;
}

.c-epoch:after {
  display: block;
  content: '';
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 41.5%;
  clip-path: polygon(33% 0, 67% 0, 100% 100%, 0% 100%);
  background: #201f27;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console