Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <head>
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <!--==============Animate.cssのCDNを読み込み===============-->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.min.css">

  <!--==============レイアウトを制御する独自のCSSを読み込み===============-->
  <link href="https://assets.codepen.io/6329135/reset04.css" rel="stylesheet">
</head>

<body>
  <!--パタッ-->
  <div class="flex">
    <div class="box flipDown"><img src="https://assets.codepen.io/6329135/webnavi1.png" width="100" /><br>パタッ(下へ)</div>
    <div class="box flipLeft"><img src="https://assets.codepen.io/6329135/webnavi1.png" width="100" /><br>パタッ(左へ)</div>
    <div class="box flipLeftTop"><img src="https://assets.codepen.io/6329135/webnavi1.png" width="100" /><br>パタッ(左上へ)</div>
    <div class="box flipRight"><img src="https://assets.codepen.io/6329135/webnavi1.png" width="100" /><br>パタッ(右へ)</div>
    <div class="box flipRightTop"><img src="https://assets.codepen.io/6329135/webnavi1.png" width="100" /><br>パタッ(右上へ)</div>
  </div>
</body>
              
            
!

CSS

              
                @charset "utf-8";

/*==================================================
パタッ
===================================*/

/* 下へ */
.flipDown {
  animation-name: flipDownAnime;
  animation-duration: 2s;
  animation-fill-mode: forwards;
  opacity: 0;
}

@keyframes flipDownAnime {
  from {
    transform: perspective(2500px) rotateX(100deg);
    opacity: 0;
  }

  to {
    transform: perspective(2500px) rotateX(0);
    opacity: 1;
  }
}

/* 左へ */
.flipLeft {
  animation-name: flipLeftAnime;
  animation-duration: 2s;
  animation-fill-mode: forwards;
  perspective-origin: left center;
  opacity: 0;
}

@keyframes flipLeftAnime {
  from {
    transform: perspective(600px) translate3d(0, 0, 0) rotateY(60deg);
    opacity: 0;
  }

  to {
    transform: perspective(600px) translate3d(0, 0, 0) rotateY(0deg);
    opacity: 1;
  }
}

/* 左上へ */
.flipLeftTop {
  animation-name: flipLeftTopAnime;
  animation-duration: 2s;
  animation-fill-mode: forwards;
  opacity: 0;
}

@keyframes flipLeftTopAnime {
  from {
    transform: translate(-20px, 80px) rotate(-15deg);
    opacity: 0;
  }

  to {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
}

/* 右へ */
.flipRight {
  animation-name: flipRightAnime;
  animation-duration: 2s;
  animation-fill-mode: forwards;
  perspective-origin: right center;
  opacity: 0;
}

@keyframes flipRightAnime {
  from {
    transform: perspective(600px) translate3d(0, 0, 0) rotateY(-60deg);
    opacity: 0;
  }

  to {
    transform: perspective(600px) translate3d(0, 0, 0) rotateY(0deg);
    opacity: 1;
  }
}

/* 右上へ */
.flipRightTop {
  animation-name: flipRightTopAnime;
  animation-duration: 2s;
  animation-fill-mode: forwards;
  opacity: 0;
}

@keyframes flipRightTopAnime {
  from {
    transform: translate(-20px, 80px) rotate(25deg);
    opacity: 0;
  }

  to {
    transform: translate(0, 1) rotate(0deg);
    opacity: 1;
  }
}

/*========= レイアウトのためのCSS ===============*/

body {
  vertical-align: middle;
  text-align: center;
  width: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-image: linear-gradient(
    100.6deg,
    rgba(218, 185, 252, 1) 22%,
    rgba(125, 89, 252, 1) 80%
  );
}

.flex {
  display: flex;
  flex-wrap: wrap;
  margin-top: 30px;
}

.box {
  width: 200px;
  padding: 20px;
  margin: 20px 20px;
  color: #333;
  box-sizing: border-box;
  white-space: nowrap;

  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6.5px);
  -webkit-backdrop-filter: blur(6.5px);

  box-shadow: 0px 6px 15px 0px rgba(142, 142, 142, 0.19);
  -webkit-box-shadow: 0px 6px 15px 0px rgba(142, 142, 142, 0.19);

  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  -webkit-border-radius: 12px;
} /*========= レイアウトのためのCSS ===============*/

body {
  vertical-align: middle;
  text-align: center;
  width: 100%;
  height: 100vh;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-image: linear-gradient(
    100.6deg,
    rgba(218, 185, 252, 1) 22%,
    rgba(125, 89, 252, 1) 80%
  );
}

.flex {
  display: flex;
  flex-wrap: wrap;
  margin-top: 30px;
}

.box {
  width: 200px;
  padding: 20px;
  margin: 20px 20px;
  color: #333;
  box-sizing: border-box;
  white-space: nowrap;

  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6.5px);
  -webkit-backdrop-filter: blur(6.5px);

  box-shadow: 0px 6px 15px 0px rgba(142, 142, 142, 0.19);
  -webkit-box-shadow: 0px 6px 15px 0px rgba(142, 142, 142, 0.19);

  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  -webkit-border-radius: 12px;
}

              
            
!

JS

              
                
              
            
!
999px

Console