Popup / 26 ブルータリズム|Brutalism
デザイン見本
Brutalism Popup
高コントラストで極太のボーダー、ハードな影を持つ無骨なポップアップです。
昨今トレンドの Neo-Brutalism スタイルを取り入れた、高コントラストでソリッドなデザインです。影にぼかしを入れないことで、個性的でパンチのある見栄えになります。
実装コード
HTML
<div id="popup-container-26">
<button id="popup-btn-26">Brutalism</button>
</div>
<div id="popup-26" class="popup-26">
<div class="popup-content-26">
<p>Brutalism Popup</p>
<p>高コントラストで極太のボーダー、ハードな影を持つ無骨なポップアップです。</p>
</div>
</div>
CSS
#popup-btn-26 {
cursor: pointer;
border: 3px solid #000;
padding: 12px 24px;
border-radius: 0;
font-weight: 800;
display: block;
margin: 0 auto;
width: 180px;
color: #000;
background-color: #ffde59;
box-shadow: 6px 6px 0 #000;
transition: all 0.1s;
text-transform: uppercase;
}
#popup-btn-26:hover {
transform: translate(2px, 2px);
box-shadow: 4px 4px 0 #000;
}
#popup-btn-26:active {
transform: translate(6px, 6px);
box-shadow: 0 0 0 #000;
}
.popup-26 {
position: fixed;
bottom: -100%;
left: 50%;
transform: translateX(-50%);
z-index: 1001;
opacity: 0;
visibility: hidden;
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
max-width: 90%;
}
.popup-26.active {
opacity: 1;
visibility: visible;
bottom: 30px;
transform: translateX(-50%);
animation: popupShowHide26 3.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes popupShowHide26 {
0% { opacity: 0; transform: translateX(-50%) translateY(100%) scale(0.9); box-shadow: 0 0 0 #000; }
15% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); box-shadow: 12px 12px 0 #000; }
85% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); box-shadow: 12px 12px 0 #000; }
100% { opacity: 0; transform: translateX(-50%) translateY(100%) scale(0.9); box-shadow: 0 0 0 #000; }
}
.popup-content-26 {
background: #ffde59;
padding: 30px 40px;
border: 4px solid #000;
text-align: center;
min-width: 320px;
box-shadow: 12px 12px 0 #000;
}
.popup-content-26 p:first-child {
font-size: 26px;
font-weight: 900;
margin-bottom: 15px;
color: #000;
text-transform: uppercase;
letter-spacing: 1px;
}
.popup-content-26 p:last-of-type {
font-size: 16px;
color: #000;
margin-bottom: 0;
line-height: 1.6;
font-weight: 600;
}
JS
var btn = document.getElementById('popup-btn-26');
var popup = document.getElementById('popup-26');
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');
}
});
}