Popup / 13 絵文字|Emoji
デザイン見本
😀🎉 Emoji Popup 🎮✨
絵文字を使ったポップで楽しいポップアップウィンドウです。
明るい黄色と破線のボーダー、立体的なシャドウ(box-shadow)でポップさを表現しました。バウンドするアニメーション(bounce)が、楽しい雰囲気を盛り上げます。
実装コード
HTML
<div id="popup-container-13">
<button id="popup-btn-13">Emoji</button>
</div>
<div id="popup-13" class="popup-13">
<div class="popup-content-13">
<p>😀🎉 Emoji Popup 🎮✨</p>
<p>絵文字を使ったポップで楽しいポップアップウィンドウです。</p>
</div>
</div>
CSS
#popup-btn-13 {
cursor: pointer;
border: none;
padding: 12px 24px;
border-radius: 16px;
font-weight: 600;
display: block;
margin: 0 auto;
width: 180px;
color: #000; background-color: #ffeb3b; border: 2px solid #000; box-shadow: 4px 4px 0px #000;
}
#popup-btn-13:hover {
opacity: 0.5;
}
.popup-13 {
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-13.active {
opacity: 1;
visibility: visible;
bottom: 20px;
transform: translateX(-50%);
animation: popupShowHide13 3.4s cubic-bezier(.68,-0.55,.27,1.55) forwards;
}
@keyframes popupShowHide13 {
0% { opacity: 0; transform: translateX(-50%) scale(0.7) rotate(-10deg); }
20% { opacity: 1; transform: translateX(-50%) scale(1.05) rotate(3deg); }
80% { opacity: 1; transform: translateX(-50%) scale(1) rotate(0deg); }
100% { opacity: 0; transform: translateX(-50%) scale(0.7) rotate(10deg); }
}
.popup-content-13 {
background: #fffbe7;
padding: 32px 36px;
border-radius: 32px;
text-align: center;
min-width: 300px;
box-shadow: 0 8px 32px #ffe066, 0 2px 8px rgba(0,0,0,0.08);
border: 3px dashed #ffb347;
font-size: 20px;
position: relative;
animation: emojiBounce 1.2s infinite alternate;
}
@keyframes emojiBounce {
0% { transform: translateY(0); }
100% { transform: translateY(-8px); }
}
.popup-content-13 p:first-child {
font-size: 32px;
margin-bottom: 12px;
letter-spacing: 2px;
}
.popup-content-13 p:last-of-type {
font-size: 16px;
color: #b8860b;
margin-bottom: 0;
line-height: 1.7;
}
JS
var btn = document.getElementById('popup-btn-13');
var popup = document.getElementById('popup-13');
if (btn && popup) {
btn.addEventListener('click', function () {
popup.classList.add('active');
});
popup.addEventListener('animationend', function () {
popup.classList.remove('active');
});
}