Popup / 19 ペーパーフォールド|Paper Fold
デザイン見本
Paper Fold Popup
折り紙のような立体的なデザインのポップアップです。
紙を折りたたんで開くような動き(scaleY)を取り入れたデザインです。右上の折り返し(ドッグイヤー)装飾が、アナログな質感をプラスしています。
実装コード
HTML
<div id="popup-container-19">
<button id="popup-btn-19">Paper Fold</button>
</div>
<div id="popup-19" class="popup-19">
<div class="popup-content-19">
<p>Paper Fold Popup</p>
<p>折り紙のような立体的なデザインのポップアップです。</p>
</div>
</div>
CSS
#popup-btn-19 {
cursor: pointer;
border: none;
padding: 12px 24px;
border-radius: 16px;
font-weight: 600;
display: block;
margin: 0 auto;
width: 180px;
color: #2c3e50; background-color: #ecf0f1; border-bottom: 3px solid #bdc3c7;
}
#popup-btn-19:hover {
opacity: 0.5;
}
.popup-19 {
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-19.active {
opacity: 1;
visibility: visible;
bottom: 20px;
transform: translateX(-50%);
animation: popupShowHide19 3.4s ease forwards;
}
@keyframes popupShowHide19 {
0% {
opacity: 0;
transform: translateX(-50%) translateY(100%) rotateX(15deg) rotateY(-15deg);
}
20% {
opacity: 1;
transform: translateX(-50%) translateY(0) rotateX(0deg) rotateY(0deg);
}
80% {
opacity: 1;
transform: translateX(-50%) translateY(0) rotateX(0deg) rotateY(0deg);
}
100% {
opacity: 0;
transform: translateX(-50%) translateY(100%) rotateX(-15deg) rotateY(15deg);
}
}
.popup-content-19 {
background: #ffffff;
padding: 40px;
border-radius: 0;
text-align: center;
position: relative;
min-width: 320px;
box-shadow:
0 0 0 1px #e0e0e0,
0 8px 16px rgba(0,0,0,0.1),
0 4px 8px rgba(0,0,0,0.05);
animation: paperFold 0.6s ease-out;
}
@keyframes paperFold {
0% {
opacity: 0;
transform: scale(0.8) rotate(5deg);
}
100% {
opacity: 1;
transform: scale(1) rotate(0deg);
}
}
.popup-content-19::before {
content: '';
position: absolute;
top: 0;
right: 0;
width: 0;
height: 0;
border-style: solid;
border-width: 0 30px 30px 0;
border-color: transparent #f0f0f0 transparent transparent;
box-shadow: -2px 2px 4px rgba(0,0,0,0.1);
}
.popup-content-19::after {
content: '';
position: absolute;
top: 0;
right: 0;
width: 0;
height: 0;
border-style: solid;
border-width: 0 25px 25px 0;
border-color: transparent #e0e0e0 transparent transparent;
}
.popup-content-19 p:first-child {
font-size: 28px;
font-weight: bold;
margin-bottom: 20px;
color: #2c3e50;
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
border-bottom: 3px solid #3498db;
padding-bottom: 10px;
font-family: 'Georgia', serif;
}
.popup-content-19 p:last-of-type {
font-size: 16px;
color: #555;
margin-bottom: 0;
line-height: 1.8;
font-weight: 400;
font-style: italic;
}
JS
var btn = document.getElementById('popup-btn-19');
var popup = document.getElementById('popup-19');
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');
}
});
}