Popup / 21 オリガミ|Origami
デザイン見本
Origami Popup
折り紙の折り方にインスピレーションを得たポップアップです。
CSSのclip-pathプロパティを利用して八角形に切り抜いた幾何学的なデザインです。回転しながら出現するアニメーション(rotateX)と鮮やかなグラデーションが、アーティスティックな印象を与えます。
実装コード
HTML
<div id="popup-container-21">
<button id="popup-btn-21">Origami</button>
</div>
<div id="popup-21" class="popup-21">
<div class="popup-content-21">
<p>Origami Popup</p>
<p>折り紙の折り方にインスピレーションを得たポップアップです。</p>
</div>
</div>
CSS
#popup-btn-21 {
cursor: pointer;
border: none;
padding: 12px 24px;
border-radius: 16px;
font-weight: 600;
display: block;
margin: 0 auto;
width: 180px;
color: #fff; background-color: #ff5722;
}
#popup-btn-21:hover {
opacity: 0.5;
}
.popup-21 {
position: fixed;
bottom: -100%;
left: 50%;
transform: translateX(-50%);
z-index: 1001;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
max-width: 90%;
max-height: 90%;
}
.popup-21.active {
opacity: 1;
visibility: visible;
bottom: 20px;
transform: translateX(-50%);
animation: popupShowHide21 3.4s ease forwards;
}
@keyframes popupShowHide21 {
0% {
opacity: 0;
transform: translateX(-50%) translateY(100%) scale(0.5) rotate(45deg);
}
20% {
opacity: 1;
transform: translateX(-50%) translateY(0) scale(1.1) rotate(0deg);
}
30% {
transform: translateX(-50%) translateY(0) scale(1) rotate(0deg);
}
80% {
opacity: 1;
transform: translateX(-50%) translateY(0) scale(1) rotate(0deg);
}
100% {
opacity: 0;
transform: translateX(-50%) translateY(100%) scale(0.5) rotate(-45deg);
}
}
.popup-content-21 {
background: linear-gradient(135deg, #ff9ff3 0%, #f368e0 50%, #ff6b6b 100%);
padding: 50px;
border-radius: 0;
text-align: center;
position: relative;
min-width: 320px;
clip-path: polygon(0 0, 90% 0, 100% 10%, 100% 100%, 10% 100%, 0 90%);
box-shadow:
0 10px 30px rgba(0,0,0,0.3),
0 0 0 1px rgba(255,255,255,0.2);
animation: origamiFold 0.7s ease-out;
transform-origin: center;
}
@keyframes origamiFold {
0% {
opacity: 0;
transform: scale(0.5) rotate(45deg);
clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%);
}
50% {
clip-path: polygon(25% 25%, 75% 25%, 75% 75%, 25% 75%, 25% 25%, 25% 25%);
}
100% {
opacity: 1;
transform: scale(1) rotate(0deg);
clip-path: polygon(0 0, 90% 0, 100% 10%, 100% 100%, 10% 100%, 0 90%);
}
}
.popup-content-21::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
animation: origamiShine 3s ease-in-out infinite;
}
@keyframes origamiShine {
0%, 100% {
opacity: 0;
}
50% {
opacity: 1;
}
}
.popup-content-21 p:first-child {
font-size: 30px;
font-weight: bold;
margin-bottom: 25px;
color: white;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
font-family: 'Arial', sans-serif;
text-align: center;
transform: skew(-2deg);
}
.popup-content-21 p:last-of-type {
font-size: 16px;
color: white;
margin-bottom: 0;
line-height: 1.7;
font-weight: 500;
text-align: center;
text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
JS
var btn = document.getElementById('popup-btn-21');
var popup = document.getElementById('popup-21');
if (btn && popup) {
btn.addEventListener('click', function () {
popup.classList.add('active');
});
popup.addEventListener('animationend', function (e) {
if (e.animationName.startsWith('popupShowHide')) {
popup.classList.remove('active');
}
});
}