<div id="draggable-popup" class="win-popup" style="display: none;">
<div id="popup-header" class="win-header">
<span class="win-title">Notice.exe</span>
<div class="win-buttons">
<span class="win-btn" onclick="toggleFold()">_</span>
<span class="win-btn" onclick="closePopup()">×</span>
</div>
</div>
<div id="popup-body-content" class="win-body">
<div class="win-img-box">
<img src="https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExNHJueHBybm5ueXF6emRyeXp6eXp6eXp6eXp6eXp6eXp6eXp6eCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/3o7TKMGpxxcaUvWd0c/giphy.gif" alt="์์ ฏ ์ด๋ฏธ์ง">
</div>
<div class="win-text">
<h3>๊ณต์ง์ฌํญ</h3>
<p>๋ซ๊ธฐ(×)๋ฅผ ๋๋ฅด๋ฉด ์ด ์ฐฝ์ ๋ซ๊ธฐ ์ ๊น์ง๋ ๋ค์ ๋์ค์ง ์์ต๋๋ค. <br>์ฌ๋ฐฉ๋ฌธ ์์๋ ๋ค์ ๋ํ๋ฉ๋๋ค!</p>
</div>
</div>
</div>
<style>
.win-popup {
position: fixed;
top: 120px;
left: 40px;
width: 280px;
z-index: 9999;
background: #c0c0c0;
border: 2px solid;
border-color: #ffffff #808080 #808080 #ffffff;
box-shadow: 4px 4px 10px rgba(0,0,0,0.3);
font-family: 'Tahoma', sans-serif;
padding: 2px;
}
.win-header {
background: linear-gradient(90deg, #000080, #1084d0);
padding: 4px 8px;
display: flex;
justify-content: space-between;
align-items: center;
cursor: move;
}
.win-title { color: white; font-size: 11px; font-weight: bold; pointer-events: none; }
.win-btn {
width: 18px; height: 16px; background: #c0c0c0;
border: 1px solid; border-color: #ffffff #808080 #808080 #ffffff;
font-size: 12px; text-align: center; line-height: 12px; cursor: pointer;
margin-left: 2px;
}
.win-body { padding: 15px; border: 1px inset #ffffff; margin-top: 2px; background: #c0c0c0; }
.folded { display: none; }
.win-img-box img { width: 100%; border: 2px inset #808080; display: block; margin-bottom: 10px; }
.win-text h3 { font-size: 14px; margin: 0 0 5px 0; color: #000; }
.win-text p { font-size: 12px; line-height: 1.4; color: #222; }
/* ๋ฏธ๋์ด ์ฟผ๋ฆฌ: 768px ์ดํ์ผ ๋ CSS๋ก ์์ ํ ์จ๊น */
@media (max-width: 768px) {
#draggable-popup {
display: none !important;
}
}
</style>
<script>
const popup = document.getElementById("draggable-popup");
const bodyContent = document.getElementById("popup-body-content");
// โ
์์ ํฌ์ธํธ: ํ๋ฉด ๋๋น๊ฐ 768px๋ณด๋ค ํด ๋(PC)๋ง ์คํํ๋๋ก ์กฐ๊ฑด ์ถ๊ฐ
if (window.innerWidth > 768 && !sessionStorage.getItem("hidePopup")) {
popup.style.display = "block";
}
function closePopup() {
popup.style.display = "none";
sessionStorage.setItem("hidePopup", "true");
}
function toggleFold() {
bodyContent.classList.toggle("folded");
}
let isDragging = false;
let offset = { x: 0, y: 0 };
document.getElementById("popup-header").addEventListener("mousedown", (e) => {
isDragging = true;
offset.x = e.clientX - popup.offsetLeft;
offset.y = e.clientY - popup.offsetTop;
});
document.addEventListener("mousemove", (e) => {
if (!isDragging) return;
popup.style.left = (e.clientX - offset.x) + "px";
popup.style.top = (e.clientY - offset.y) + "px";
});
document.addEventListener("mouseup", () => { isDragging = false; });
</script>
์ ์ฝ๋ ๋ณต์ฌ ํ html > /body ๋ฐ๋ก ์ ๋ถ์ฌ๋ฃ๊ธฐ ํ์๋ฉด ๋~
!๋ชจ๋ฐ์ผ์์๋ ๋ณด์ด์ง ์์์!
- ์ปค์คํ ์ค๋ช
(์ ๋ชฉ ๋๋ ์์ ๋ชฉ ๋ณ๊ฒฝ)
<span class="win-title">Notice.exe</span>
์์ ๋นจ๊ฐ์์ผ๋ก ๋์ด์๋ ๋ถ๋ถ์ ์ํ์๋ ๊ธ์ ์จ๋ฃ์ผ์๋ฉด ์ฐฝ ์ ๋ชฉ์ด ๋ฐ๋๋๋ค!
<div class="win-text">
<h3>๊ณต์ง์ฌํญ</h3>
<p>๋ซ๊ธฐ(×)๋ฅผ ๋๋ฅด๋ฉด ์ด ์ฐฝ์ ๋ซ๊ธฐ ์ ๊น์ง๋ ๋ค์ ๋์ค์ง ์์ต๋๋ค. <br>์ฌ๋ฐฉ๋ฌธ ์์๋ ๋ค์ ๋ํ๋ฉ๋๋ค!</p>
๋นจ๊ฐ์์ผ๋ก ๋์ด์๋ ๋ถ๋ถ์ ์์ ํ๋ฉด ๋ฉ๋๋ค!
- <br>๋ ์ค ๋ฐ๊พธ๋ ํ๊ทธ์ ๋๋ค -
(์ด๋ฏธ์ง ๋ณ๊ฒฝ)
<img src="https://media.giphy.com~~~" alt="์์ ฏ ์ด๋ฏธ์ง">
๋นจ๊ฐ์์ผ๋ก ๋์ด์๋ ๋ถ๋ถ์ ์ด๋ฏธ์ง ์ฃผ์๋ฅผ ๋ฃ์ด์ฃผ์๋ฉด ๋ฉ๋๋ค! (์์งค๋ ๊ฐ๋ฅ)
03.30 / ๊น๋ํ ๋์์ธ ๋ฒ์ ๋ ์ถ๊ฐํ์ต๋๋ค~
<div id="final-clean-popup" class="modern-popup">
<div id="final-popup-header" class="modern-header">
<span class="modern-title">Notice</span>
<div class="modern-buttons">
<button type="button" id="btn-popup-fold" class="modern-btn">_</button>
<button type="button" id="btn-popup-close" class="modern-btn">×</button>
</div>
</div>
<div id="final-popup-body" class="modern-body">
<div class="modern-img-box">
<img src="https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExNHJueHBybm5ueXF6emRyeXp6eXp6eXp6eXp6eXp6eXp6eXp6eCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/3o7TKMGpxxcaUvWd0c/giphy.gif" alt="widget">
</div>
<div class="modern-text">
<h3>๊ณต์ง์ฌํญ</h3>
<p>X๋ฅผ ๋๋ฅด๋ฉด ์๋ก๊ณ ์นจ ํด๋ ๋จ์ง ์์ต๋๋ค!<br>์ฌ๋ฐฉ๋ฌธ์ ํ์
์ผ ์ฐฝ์ด ๋ค์ ๋ํ๋๋ฉฐ, ์ฐฝ์ ์ ๊ฑฐ๋ ์ธ์
๋์ ๋ซ์ ์ ์์ต๋๋ค.</p>
</div>
</div>
</div>
<style>
.modern-popup {
position: fixed; top: 120px; left: 40px; width: 260px; z-index: 99999;
background: rgba(255, 255, 255, 0.85);
backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.5);
box-shadow: 0 12px 30px rgba(0,0,0,0.12);
font-family: 'Pretendard', sans-serif; overflow: hidden; display: none;
}
.modern-header {
padding: 12px 15px; background: rgba(0, 0, 0, 0.04);
display: flex; justify-content: space-between; align-items: center;
cursor: move; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.modern-title { font-size: 13px; font-weight: 700; color: #333; pointer-events: none; }
.modern-buttons { display: flex; gap: 6px; }
.modern-btn {
background: rgba(0,0,0,0.05); border: none; width: 24px; height: 24px;
border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: bold;
display: flex; align-items: center; justify-content: center;
transition: all 0.2s; color: #555; padding: 0; line-height: 1;
}
.modern-btn:hover { background: rgba(0,0,0,0.15); color: #000; }
.modern-btn:active { transform: scale(0.9); }
.modern-body { padding: 18px; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; }
.is-folded { display: none !important; }
.modern-img-box img { width: 100%; border-radius: 10px; margin-bottom: 12px; display: block; }
.modern-text h3 { font-size: 15px; margin: 0 0 6px 0; color: #111; font-weight: 700; }
.modern-text p { font-size: 12px; color: #555; line-height: 1.6; margin: 0; }
/* โ
์์ 1: ID ์ด๋ฆ์ 'final-clean-popup'์ผ๋ก ์ ํํ ๋ง์ถค */
@media (max-width: 768px) {
#final-clean-popup {
display: none !important;
}
}
</style>
<script>
(function() {
document.addEventListener("DOMContentLoaded", function() {
const popup = document.getElementById('final-clean-popup');
const header = document.getElementById('final-popup-header');
const body = document.getElementById('final-popup-body');
const btnFold = document.getElementById('btn-popup-fold');
const btnClose = document.getElementById('btn-popup-close');
// โ
์์ 2: JS ์คํ ๋จ๊ณ์์๋ PC ํ๋ฉด(768px ์ด๊ณผ)์ผ ๋๋ง ๋์ฐ๋๋ก ์ค์
if (window.innerWidth > 768 && !sessionStorage.getItem('hideFinalPopup')) {
popup.style.display = 'block';
}
btnFold.addEventListener('click', function(e) {
e.stopPropagation();
body.classList.toggle('is-folded');
});
btnClose.addEventListener('click', function(e) {
e.stopPropagation();
popup.style.display = 'none';
sessionStorage.setItem('hideFinalPopup', 'true');
});
let isDragging = false;
let currentX, currentY, initialX, initialY, xOffset = 0, yOffset = 0;
header.addEventListener("mousedown", dragStart);
document.addEventListener("mousemove", drag);
document.addEventListener("mouseup", dragEnd);
function dragStart(e) {
initialX = e.clientX - xOffset;
initialY = e.clientY - yOffset;
if (e.target === header) isDragging = true;
}
function drag(e) {
if (isDragging) {
e.preventDefault();
currentX = e.clientX - initialX;
currentY = e.clientY - initialY;
xOffset = currentX;
yOffset = currentY;
popup.style.transform = `translate(${currentX}px, ${currentY}px)`;
}
}
function dragEnd() {
initialX = currentX;
initialY = currentY;
isDragging = false;
}
});
})();
</script>