Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ add another resource

JavaScript

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

Packages

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.

Behavior

Auto Save

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.

HTML

              
                
<div class="realvjy">
  A Snippets from my website <a href="https://vjy.me/book">vjy.me</a>
</div>
<div class="book-wrapper">
  <div class="book-items">
    <div class="main-book-wrap">
      <div class="book-cover">
        <div class="book-inside"></div>
        <div class="book-image">
          <img src="https://i.imgur.com/SPv9Rg7.png" />
          <div class="effect"></div>
          <div class="light"></div>
        </div>

      </div>
    </div>
  </div>
  <div class="book-items">
    <div class="main-book-wrap">
      <div class="book-cover">
        <div class="book-inside"></div>
        <div class="book-image">
          <img src="https://i.imgur.com/UIPQEwk.png" />
          <div class="effect"></div>
          <div class="light"></div>
        </div>
      </div>
    </div>
  </div>
  <div class="book-items">
    <div class="main-book-wrap">
      <div class="book-cover">
        <div class="book-inside"></div>
        <div class="book-image">
          <img src="https://i.imgur.com/nwzWCgm.png" />
          <div class="effect"></div>
          <div class="light"></div>
        </div>

      </div>
    </div>
  </div>
  <div class="book-items">
    <div class="main-book-wrap">
      <div class="book-cover">
        <div class="book-inside"></div>
        <div class="book-image">
          <img src="https://i.imgur.com/YdfU4Bw.png" />
          <div class="effect"></div>
          <div class="light"></div>
        </div>

      </div>
    </div>
  </div>
  <div class="book-items">
    <div class="main-book-wrap">
      <div class="book-cover">
        <div class="book-inside"></div>
        <div class="book-image">
          <img src="https://i.imgur.com/sVNy4Ct.png" />
          <div class="effect"></div>
          <div class="light"></div>
        </div>

      </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                body {
  width: 100%;
}
.book-wrapper {
  width: 900px;
  position: relative;
  margin: 0 auto;
  column-count: 3;
  column-gap: 12px;
  padding: 4px;
}
.book-items {
  position: relative;
  cursor: default;
  padding: 16px;
  margin: 0;
  display: grid;
  break-inside: avoid;
}

.main-book-wrap {
  position: relative;
}

.book-cover {
  position: relative;
}

.book-cover .book-inside {
  position: absolute;
  width: 90%;
  height: 96%;
  top: 1%;
  left: 16px;
  border: 1px solid grey;
  border-radius: 2px 6px 6px 2px;
  background: white;
  box-shadow: 10px 40px 40px -10px #00000030, inset -2px 0 0 grey,
    inset -3px 0 0 #dbdbdb, inset -4px 0 0 white, inset -5px 0 0 #dbdbdb,
    inset -6px 0 0 white, inset -7px 0 0 #dbdbdb, inset -8px 0 0 white,
    inset -9px 0 0 #dbdbdb;
}

.book-cover .book-image {
  line-height: 0;
  position: relative;
  border-radius: 2px 6px 6px 2px;
  box-shadow: 6px 6px 18px -2px rgba(0, 0, 0, 0.2),
    24px 28px 40px -6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
  transform: perspective(2000px) rotateY(-15deg) translateX(-10px) scaleX(0.94);
  cursor: pointer;
}

.book-image img {
  grid-row: 1 / -1;
  grid-column: 1;
  width: 100%;
  border-radius: 2px 6px 6px 2px;
}

.book-image:hover {
  transform: perspective(2000px) rotateY(0deg) translateX(0px) scaleX(1);
  transform-style: preserve-3d;
  box-shadow: 6px 6px 12px -1px rgba(0, 0, 0, 0.1),
    20px 14px 16px -6px rgba(0, 0, 0, 0.1);
}

.effect {
  position: absolute;
  width: 20px;
  height: 100%;
  margin-left: 16px;
  top: 0;
  border-left: 2px solid #00000010;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: all 0.5s ease;
  z-index: 5;
}

.light {
  width: 90%;
  height: 100%;
  position: absolute;
  border-radius: 3px;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 100%
  );
  top: 0;
  right: 0;
  opacity: 0.1;
  transition: all 0.5s ease;
  z-index: 4;
}

.book-image:hover .effect{
    margin-left: 14px;
}

.realvjy{
  width: 900px;
  padding: 20px;
  margin: 0 auto;
  font-family: sans-serif;
  text-align: center
}
              
            
!

JS

              
                
              
            
!
999px

Console