<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css" rel="stylesheet">
<style>@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;
}</style>
</head>
<body>
<body>
<!--パタッ-->
<div class="flex">
<div class="box flipDown">
<img src="http://localhost:10072/wp-content/uploads/demos/_assets/webnavi1.png" width="100" />
<br>パタッ(下へ)</div>
<div class="box flipLeft">
<img src="http://localhost:10072/wp-content/uploads/demos/_assets/webnavi1.png" width="100" />
<br>パタッ(左へ)</div>
<div class="box flipLeftTop">
<img src="http://localhost:10072/wp-content/uploads/demos/_assets/webnavi1.png" width="100" />
<br>パタッ(左上へ)</div>
<div class="box flipRight">
<img src="http://localhost:10072/wp-content/uploads/demos/_assets/webnavi1.png" width="100" />
<br>パタッ(右へ)</div>
<div class="box flipRightTop">
<img src="http://localhost:10072/wp-content/uploads/demos/_assets/webnavi1.png" width="100" />
<br>パタッ(右上へ)</div>
</div>
<script>
</script>
</body>
</html>