Popup / 24 リキッド|Liquid
デザイン見本
Liquid Popup
液体のように縁や形がうねる有機的なデザインのポップアップです。
border-radius の値のアニメーションを用いて、液体がうねっているような予測不可能な有機的フォルムを生み出します。水滴が飛び出すような出現演出が魅力です。
実装コード
HTML
<div id="popup-container-24">
<button id="popup-btn-24">Liquid</button>
</div>
<div id="popup-24" class="popup-24">
<div class="popup-content-24">
<p>Liquid Popup</p>
<p>液体のように縁や形がうねる有機的なデザインのポップアップです。</p>
</div>
</div>
CSS
#popup-btn-24 {
cursor: pointer;
border: none;
padding: 12px 24px;
border-radius: 16px;
font-weight: 600;
display: block;
margin: 0 auto;
width: 180px;
color: #fff;
background-color: #00d2ff;
border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
animation: liquidMorphBtn 3s ease-in-out infinite;
transition: all 0.3s;
}
@keyframes liquidMorphBtn {
0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
34% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
67% { border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%; }
}
#popup-btn-24:hover {
background-color: #3a7bd5;
}
.popup-24 {
position: fixed;
bottom: -100%;
left: 50%;
transform: translateX(-50%);
z-index: 1001;
opacity: 0;
visibility: hidden;
transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
max-width: 90%;
}
.popup-24.active {
opacity: 1;
visibility: visible;
bottom: 30px;
transform: translateX(-50%);
animation: popupShowHide24 3.4s forwards;
}
@keyframes popupShowHide24 {
0% { opacity: 0; transform: translateX(-50%) translateY(100vh) scale(0.5); }
15% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
85% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
100% { opacity: 0; transform: translateX(-50%) translateY(100vh) scale(0.5); }
}
.popup-content-24 {
background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
padding: 40px;
text-align: center;
min-width: 320px;
box-shadow: 0 20px 40px rgba(58, 123, 213, 0.4);
color: white;
border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
animation: liquidShape 6s ease-in-out infinite alternate;
}
@keyframes liquidShape {
0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}
.popup-content-24 p:first-child {
font-size: 26px;
font-weight: 700;
margin-bottom: 15px;
}
.popup-content-24 p:last-of-type {
font-size: 16px;
margin-bottom: 0;
line-height: 1.6;
}
JS
var btn = document.getElementById('popup-btn-24');
var popup = document.getElementById('popup-24');
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');
}
});
}