← 一覧へ

Popup / 06 付箋風|Sticky Note

デザイン見本

メモ用紙や付箋をイメージしたデザインです。左端のカラーアクセントと、角を折り返したような装飾(CSS擬似要素)が特徴です。わずかに傾けることで、ラフで親しみやすい印象を与えます。

実装コード

HTML
<div id="popup-container-6">
  <button id="popup-btn-6">Sticky Note</button>
</div>
<div id="popup-6" class="popup-6">
  <div class="popup-content-6">
    <p>Sticky Note Popup</p>
    <p>付箋のような見た目のポップアップウィンドウです。</p>
  </div>
</div>
CSS
/* Button Style */
#popup-btn-6 {
  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-6:hover {
  opacity: 0.5;
}

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

@keyframes popupShowHide6 {
  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-6 {
  background: #ffffff;
  padding: 30px;
  border-radius: 0;
  text-align: center;
  position: relative;
  min-width: 300px;
  box-shadow: 0 20px 60px rgba(23, 162, 184, 0.15);
  border-left: 4px solid #17a2b8;
  transform: rotate(-2deg);
}

.popup-content-6::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 20px 20px 0 0;
  border-color: #17a2b8 transparent transparent transparent;
}

.popup-content-6 p:first-child {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #17a2b8;
  font-family: 'Courier New', monospace;
}

.popup-content-6 p:last-of-type {
  font-size: 16px;
  color: #666;
  margin-bottom: 25px;
  line-height: 1.6;
  font-family: 'Courier New', monospace;
}
JS
var btn = document.getElementById('popup-btn-6');
var popup = document.getElementById('popup-6');

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

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