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.

            
              <div class="hello-bar">
    <div class="row center">
        Ethan Thompson's Year-in-Review
    </div>
</div>

<div class="row">
    <div class="timeline">
        <div class="line">
            <div class="start">
                2014
            </div>
            <div class="end">
                2015
            </div>
        </div>
        <div class="event">
            <div class="icon">
            <img src="http://cdn.flaticon.com/png/256/64601.png" alt="" />
            </div>
            <div class="date">
                January
            </div>
            <div class="details">
                I found out you can buy a Twinkie maker
            </div>
        </div>
        <div class="event">
            <div class="icon">
            <img src="http://cdn.flaticon.com/png/256/48301.png" alt="" />
            </div>
            <div class="date">
                February
            </div>
            <div class="details">
                My tookus froze while I cleaned off my car
            </div>

        </div>
        <div class="event">
            <div class="icon">
            <img src="http://cdn.flaticon.com/png/256/65082.png" alt="" />
            </div>
            <div class="date">
                March
            </div>
            <div class="details">
               I was the best man in my friend Chenaniah's wedding
            </div>
        </div>
        <div class="event">
            <div class="icon">
            <img src="http://cdn.flaticon.com/png/256/34022.png" alt="" />
            </div>
            <div class="date">
                April
            </div>
            <div class="details">
                I bought my first set of Field Note's
            </div>
        </div>
        <div class="event">
            <div class="icon">
            <img src="http://cdn.flaticon.com/png/256/61291.png" alt="" />
            </div>
            <div class="date">
                May
            </div>
            <div class="details">
                I turned 20
            </div>
        </div>
        <div class="event">
            <div class="icon">
            <img src="http://cdn.flaticon.com/png/256/66315.png" alt="" />
            </div>
            <div class="date">
                June
            </div>
            <div class="details">
                I purchased my Baratza Encore coffee grinder
            </div>
        </div>
        <div class="event">
            <div class="icon">
            <img src="http://cdn.flaticon.com/png/256/43349.png" alt="" />
            </div>
            <div class="date">
                July
            </div>
            <div class="details">
                I tried my first standing desk for more then a day
            </div>
        </div>
        <div class="event">
            <div class="icon">
            <img src="http://cdn.flaticon.com/png/256/59919.png" alt="" />
            </div>
            <div class="date">
                August
            </div>
            <div class="details">
                I visited Vero Beach and my soon-to-be employer
            </div>
        </div>
        <div class="event">
            <div class="icon">
            <img src="http://cdn.flaticon.com/png/256/59801.png" alt="" />
            </div>
            <div class="date">
                September
            </div>
            <div class="details">
                Left my job at Word of Life
            </div>
        </div>
        <div class="event">
            <div class="icon">
            <img src="http://cdn.flaticon.com/png/256/23656.png" alt="" />
            </div>
            <div class="date">
                October
            </div>
            <div class="details">
                Bought my first Apple computer
            </div>
        </div>
        <div class="event">
            <div class="icon">
            <img src="http://cdn.flaticon.com/png/256/65202.png" alt="" />
            </div>
            <div class="date">
                November
            </div>
            <div class="details">
                Spent my first holiday in Florida
            </div>
        </div>
        <div class="event">
            <div class="icon">
            <img src="http://cdn.flaticon.com/png/256/62238.png" alt="" />
            </div>
            <div class="date">
                December
            </div>
            <div class="details">
                Enjoyed time at home in New York with my family
            </div>
        </div>
    </div>
</div>
            
          
!
            
              .timeline {
  width: 100%;
  height: auto;
  margin: 150px 0;
  position: relative;
  .line {
    width: 5px;
    height: 1800px;
    min-height: 250px;
    background: #393939;
    margin: 25px auto;
    left: 50%;
    right: 50%;
    z-index: 1;
    position: absolute;
  }
  .start {
    font-size: 32px;
    position: absolute;
    top: -45px;
    left: -35px;
    }
  .end {
    font-size: 32px;
    position: absolute;
    bottom: -45px;
    left: -35px;
  }
  .event {
    width: 38%;
    height: 200px;
    text-align: center;
    box-shadow: 0 0.01em 0.01em #000;
    margin: 50px 0 0 5%;
    padding: 25px;
    background: #fff;
    z-index: 2;
    float: left;
    box-sizing: border-box;
    position: relative;
    &:before {
      content: '';
      width: 0;
      height: 0;
      position: absolute;
      top: 75px;
      right: -28px;
      border-style: solid;
      border-width: 25px 0 25px 28px;
      border-color: transparent transparent transparent #ffffff;
      z-index: 4;
    }
    &:after {
      content: '';
      width: 0;
      height: 0;
      position: absolute;
      top: 74px;
      right: -30px;
      border-style: solid;
      border-width: 26px 0 26px 30px;
      border-color: transparent transparent transparent #aeaeae;
      z-index: 3;
    }
    .icon {
      position: absolute;
      right: -20px;
      top: -20px;
      height: 50px;
      width: 50px;
      background: #393939;
      border-radius: 50%;
      z-index: 3;
      img {
        max-width: 60%;
        height: auto;
        margin: 20%;
        filter: invert(100%); 
      }
    }
    .date {
      font-weight: 700;
      font-size: 2rem;
    }
    .details {
      font-weight: 400;
      font-size: 1rem;
      margin: 20px 0;
      padding: 0;
    }
    &:nth-of-type(odd) {
      float: right;
      margin: 90px 5% 0 0;
      .icon {
        left: -20px;
      }
      &:before {
      left: -28px;
      border-width: 25px 28px 25px 0;
      border-color: transparent #ffffff transparent transparent;
    }
      &:after {
      left: -30px;
      border-style: solid;
      border-width: 26px 30px 26px 0;
      border-color: transparent #aeaeae transparent transparent;
      }
    }
  }
}

@media (max-width: 768px) {
  .timeline {
    .event {
    float: right;
    width: 60%;
    min-width: 300px;
    margin: 10% 10% 0 0;
      &:before {
      content: '';
      width: 0;
      height: 0;
      position: absolute;
      top: 75px;
      left: -28px;
      width: 0;
      border-style: solid;
      border-width: 25px 28px 25px 0;
      border-color: transparent #ffffff transparent transparent;
    }
      &:after {
      left: -30px;
      border-style: solid;
      border-width: 26px 30px 26px 0;
      border-color: transparent #aeaeae transparent transparent;
      }
      .icon {
        left: -20px;
      }
      &:nth-of-type(odd) {
          margin: 10% 10% 0 0;
               }
            }
    .line {
    height: 3200px;
    left: -20px;
          }
  }
}

@media (max-width: 575px) {
  .timeline {
    padding: 100px 0 0 0;
    margin: 0 0 150px 0;
  }
  .timeline .event, .timeline .event:nth-of-type(odd) {
    float: none;
    margin: 15% auto;
            }
  .timeline .line {
    left: 50%;
    height: 3050px;
  }
  .timeline .event:before, .timeline .event:nth-of-type(odd):before, .timeline .event:after, .timeline .event:nth-of-type(odd):after {
    display: none;
  }
  .timeline .event .icon, .timeline .event:nth-of-type(odd) .icon {
    left: 128px;
  }
  .timeline .event .date {
    margin: 25px 0 0 0;
  }
  
}


/* TODO Add utility class to stylesheet*/
.center {
  text-align: center;
}
            
          
!
            
              // Icons from FlatIcon.com //
            
          
!
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.

Console