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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="card">
    <img src="" alt="">

  <div class="content">
    <h2>Awesome card title</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatibus quia, nulla! Maiores et perferendis eaque,
      exercitationem praesentium nihil.</p>

  <div class="tags">
    <a href="#">#photography</a>
    <a href="#">#nature</a>
    <a href="#">#mountain</a>

  <a draggable="false" href="#" class="read-more">Read more</a>


                @import url(',700&display=swap');

body {
  margin: 2rem;
  font-size: 1rem;
  font-weight: 400;
  font-family: Nunito, sans-serif;
  background-color: #eef1f4;

img {
  display: block;
  max-width: 100%;
  height: auto;

.card {
  display: flex;
  position: relative;
  max-width: 325px;
  flex-direction: column;
  overflow: hidden;
  border-radius: .25rem;
  background-color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
  // Things to animate/change when hovering the card.
  &:hover {
    header img {
      opacity: .8;
      transform: scale(1.1);
  header {
    position: relative;
    overflow: hidden;
    background-color: #00aeef;
    img {
      transition: transform 2s cubic-bezier(.4, 0, .2, 1), opacity 1.5s cubic-bezier(.4, 0, .2, 1);
  h2 {
    margin-top: 0;
    margin-bottom: .5rem;
    font-weight: 700;
    font-size: 1.25rem;
  .content {
    padding: 1rem 1.5rem;
  .tags {
    position: relative;
    margin-top: auto;
    z-index: 10;
    a {
      display: inline-block;
      padding: .25rem .75rem;
      margin-bottom: .75rem;
      font-size: .875rem;
      color: #4a5568;
      text-decoration: none;
      border-radius: 20px;
      background-color: #edf2f7;
      transition: background-color .2s;
      &:not(:last-child) {
        margin-right: .5rem;
      &:hover {
        background-color: darken(#edf2f7, 15%);
  .read-more {
    // Link should be invisible so let's hide it.
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    // Relative to .card so it will cover the entire card.
    &::before {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      content: "";