Popup / 20 インフォメーション|Information
デザイン見本
Information Popup
情報表示に適したクリーンなポップアップウィンドウです。
システム通知やTips表示に適した、清潔感のあるデザインです。左側のアクセントカラーと脈動するアイコン(animation: pulse)が、ユーザーの注意を自然に惹きつけます。
実装コード
HTML
<div id="popup-container-20">
<button id="popup-btn-20">Information</button>
</div>
<div id="popup-20" class="popup-20">
<div class="popup-content-20">
<p>Information Popup</p>
<p>情報表示に適したクリーンなポップアップウィンドウです。</p>
</div>
</div>
CSS
#popup-btn-20 {
cursor: pointer;
border: none;
padding: 12px 24px;
border-radius: 16px;
font-weight: 600;
display: block;
margin: 0 auto;
width: 180px;
color: #fff; background-color: #17a2b8;
}
#popup-btn-20:hover {
opacity: 0.5;
}
.popup-20 {
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-20.active {
opacity: 1;
visibility: visible;
bottom: 20px;
transform: translateX(-50%);
animation: popupShowHide20 3.4s ease forwards;
}
@keyframes popupShowHide20 {
0% {
opacity: 0;
transform: translateX(-50%) translateY(100%) scale(0.9);
}
20% {
opacity: 1;
transform: translateX(-50%) translateY(0) scale(1.1);
}
30% {
transform: translateX(-50%) translateY(0) scale(1);
}
80% {
opacity: 1;
transform: translateX(-50%) translateY(0) scale(1);
}
100% {
opacity: 0;
transform: translateX(-50%) translateY(100%) scale(0.9);
}
}
.popup-content-20 {
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
padding: 40px;
border-radius: 12px;
text-align: left;
position: relative;
min-width: 320px;
border-left: 6px solid #007bff;
box-shadow:
0 4px 12px rgba(0,123,255,0.15),
0 2px 4px rgba(0,0,0,0.1);
animation: infoSlide 0.6s ease-out;
overflow: hidden;
}
.popup-content-20::before {
content: 'ℹ';
position: absolute;
top: 52px;
left: 20px;
font-size: 32px;
color: #007bff;
background: rgba(0,123,255,0.1);
width: 50px;
height: 50px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
animation: infoIcon 2s ease-in-out infinite;
font-weight: bold;
line-height: 1;
}
@keyframes infoSlide {
0% {
opacity: 0;
transform: translateX(-50px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}
@keyframes infoIcon {
0%, 100% {
transform: scale(1);
opacity: 0.8;
}
50% {
transform: scale(1.1);
opacity: 1;
}
}
.popup-content-20 p:first-child {
font-size: 24px;
font-weight: bold;
margin-bottom: 15px;
color: #007bff;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
position: relative;
z-index: 1;
padding-left: 90px;
}
.popup-content-20 p:last-of-type {
font-size: 16px;
color: #495057;
margin-bottom: 0;
line-height: 1.6;
font-weight: 400;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
position: relative;
z-index: 1;
padding-left: 90px;
}
JS
var btn = document.getElementById('popup-btn-20');
var popup = document.getElementById('popup-20');
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');
}
});
}