Popup / 33 フロスティ|Frosty
デザイン見本
Frosty Popup
氷のような透明感とすりガラス効果を持つフロスティなポップアップです。
backdrop-filter: blur(20px) によるすりガラス効果と、::before 疑似要素の光沢スキャン(frostySheen)で氷の質感を表現。半透明の青白背景が周囲に溶け込むため、どんなページ背景にも馴染みます。
実装コード
HTML
<div id="popup-container-33">
<button id="popup-btn-33">Frosty</button>
</div>
<div id="popup-33" class="popup-33">
<div class="popup-content-33">
<p>Frosty Popup</p>
<p>氷のような透明感とすりガラス効果を持つフロスティなポップアップです。</p>
</div>
</div>
CSS
/* ボタン */
#popup-btn-33 {
cursor: pointer;
border: 1px solid rgba(168, 216, 234, 0.8);
padding: 12px 24px;
border-radius: 8px;
font-weight: 700;
display: block;
margin: 0 auto;
width: 180px;
background: linear-gradient(135deg, #a8d8ea 0%, #c9e8f5 50%, #e8f4fd 100%);
color: #1a5276;
box-shadow: 0 4px 12px rgba(168, 216, 234, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8);
transition: all 0.3s ease;
}
#popup-btn-33:hover {
background: linear-gradient(135deg, #7ec8e3 0%, #a8d8ea 50%, #c9e8f5 100%);
box-shadow: 0 6px 18px rgba(126, 200, 227, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.9);
transform: translateY(-1px);
}
/* ポップアップ外枠 */
.popup-33 {
position: fixed;
bottom: -100%;
left: 50%;
transform: translateX(-50%);
z-index: 1001;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
max-width: 90%;
}
.popup-33.active {
opacity: 1;
visibility: visible;
bottom: 30px;
animation: popupShowHide33 3.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}
@keyframes popupShowHide33 {
0% { opacity: 0; transform: translateX(-50%) translateY(50px) scale(0.9); }
15% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
82% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
100% { opacity: 0; transform: translateX(-50%) translateY(50px) scale(0.9); }
}
/* すりガラス本体 */
.popup-content-33 {
background: rgba(220, 240, 255, 0.55);
backdrop-filter: blur(20px);
padding: 28px 40px;
border-radius: 16px;
border: 1px solid rgba(168, 216, 234, 0.6);
text-align: center;
position: relative;
min-width: 320px;
box-shadow:
0 8px 32px rgba(126, 200, 227, 0.3),
inset 0 1px 0 rgba(255, 255, 255, 0.8),
inset 0 -1px 0 rgba(168, 216, 234, 0.3);
overflow: hidden;
}
/* 光沢スキャンアニメーション */
.popup-content-33::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 60%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
animation: frostySheen 3s ease-in-out infinite;
pointer-events: none;
}
@keyframes frostySheen {
0% { left: -100%; }
50% { left: 150%; }
100% { left: 150%; }
}
.popup-content-33 p:first-child {
font-size: 22px;
font-weight: 800;
margin-bottom: 10px;
color: #1a5276;
text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
letter-spacing: 1px;
}
.popup-content-33 p:last-of-type {
font-size: 14px;
color: #2471a3;
margin-bottom: 0;
line-height: 1.6;
}
JS
var btn = document.getElementById('popup-btn-33');
var popup = document.getElementById('popup-33');
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');
}
});
}