← 一覧へ

Popup / 05 ミニマル|Minimal

デザイン見本

装飾を削ぎ落としたミニマルなデザインです。細いフォントと控えめなシャドウで、情報だけに集中させたい場面に適しています。

実装コード

HTML
<div id="popup-container-5">
  <button id="popup-btn-5">Minimal</button>
</div>
<div id="popup-5" class="popup-5">
  <div class="popup-content-5">
    <p>Minimal Popup</p>
    <p>シンプルでミニマルなデザインのポップアップです。</p>
  </div>
</div>
CSS
/* Button Style */
#popup-btn-5 {
  cursor: pointer;
  border: none;
  padding: 12px 24px;
  border-radius: 16px;
  color: #333;
  background-color: #eee;
  font-weight: 600;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
  display: block;
  margin: 0 auto;
  width: 180px;
}

#popup-btn-5:hover {
  opacity: 0.5;
}

/* Popup Style */
.popup-5 {
  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-5.active {
  opacity: 1;
  visibility: visible;
  bottom: 20px;
  transform: translateX(-50%);
  animation: popupShowHide5 3.4s ease forwards;
}

@keyframes popupShowHide5 {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(100%);
  }
  20% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  80% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(100%);
  }
}

.popup-content-5 {
  background: #ffffff;
  padding: 25px;
  border-radius: 4px;
  text-align: center;
  position: relative;
  min-width: 300px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.popup-content-5 p:first-child {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 15px;
  color: #495057;
  letter-spacing: 0.5px;
}

.popup-content-5 p:last-of-type {
  font-size: 14px;
  color: #868e96;
  margin-bottom: 25px;
  line-height: 1.5;
  font-weight: 300;
}
JS
var btn = document.getElementById('popup-btn-5');
var popup = document.getElementById('popup-5');

if (btn && popup) {
  btn.addEventListener('click', function () {
    popup.classList.add('active');
  });

  popup.addEventListener('animationend', function () {
    popup.classList.remove('active');
  });
}