<!-- S : 이벤트 복사영역 여기서부터 -->
<style type="text/css">/* common */
@import url('https://fonts.googleapis.com/css2?family=Do+Hyeon&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Radio+Canada:wght@300..700&display=swap');
.art-container-event {
width: 720px;
margin: 0 auto;
text-align: center;
}
.art-content-inner {
position: relative;
width: 100%;
margin: 0 auto;
}
.art-content-inner img {
display: block;
width: 100%;
}
/* keyframe */
@keyframes flicker {
0%,
45% {
opacity: 1;
}
46%,
69% {
opacity: 0;
}
70%,
79% {
opacity: 1;
}
80%,
89% {
opacity: 0;
}
90%,
100% {
opacity: 1;
}
}
@keyframes move-in-1 {
0% {
opacity: 0;
transform: translateY(-60px);
}
20% {
opacity: 1;
transform: translateY(0);
}
35% {
transform: translateY(-20px);
}
50% {
transform: translateY(0);
}
65% {
transform: translateY(-10px);
}
80% {
transform: translateY(0);
}
90% {
transform: translateY(-4px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
@keyframes move-in-2 {
0% {
opacity: 0;
transform: translateY(-60px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fade-in {
0% {
transform: translateY(320px);
}
100% {
transform: translateY(0);
}
}
@keyframes scale {
0% {
opacity: 1;
transform: scale(0);
}
25% {
opacity: 1;
transform: scale(1);
}
50% {
opacity: 1;
transform: scale(0.6);
}
75% {
opacity: 1;
transform: scale(1);
}
100% {
opacity: 1;
transform: scale(0);
}
}
/* main */
.art-content-inner.main {
background-color: #00c956;
padding-top: 150px;
height: 874px;
overflow: hidden;
}
.art-content-inner.main .obj {
position: absolute;
}
.art-content-inner.main .obj.header {
top: 0;
animation: flicker 1s ease-in-out forwards;
animation-delay: 1.6s;
opacity: 0;
}
.art-content-inner.main .txt {
color: #fff;
font-family: 'Do Hyeon', sans-serif !important;
-webkit-text-stroke: 1px #000;
text-shadow: 2px 0px #000;
}
.art-content-inner.main .txt.date {
font-size: 40px;
letter-spacing: 0.05em;
}
.art-content-inner.main .txt.sub {
font-size: 30px;
letter-spacing: 0.02em;
}
.art-content-inner.main .txt.sub .spot {
color: #ffe812;
}
.art-content-inner.main .main-tit {
position: relative;
margin: 70px 0;
}
.art-content-inner.main .main-tit .flash-deal {
animation: move-in-1 1.4s ease-in-out forwards;
filter: drop-shadow(2px 10px 0 rgba(0, 0, 0, 0.2));
z-index: 1;
}
.art-content-inner.main .obj.lightning {
bottom: 0;
width: 111px;
animation: move-in-2 0.3s ease-in-out forwards;
z-index: 2;
opacity: 0;
}
.art-content-inner.main .obj.lightning-1 {
left: 65px;
filter: drop-shadow(-2px 10px 0 rgba(0, 0, 0, 0.2));
animation-delay: 0.4s;
}
.art-content-inner.main .obj.lightning-2 {
right: 65px;
filter: drop-shadow(2px 10px 0 rgba(0, 0, 0, 0.2));
animation-delay: 0.5s;
}
.art-content-inner.main .obj.spark {
animation: scale 3s ease-in-out infinite;
animation-delay: 0.8s;
filter: drop-shadow(2px 10px 0 rgba(0, 0, 0, 0.2));
z-index: 3;
opacity: 0;
}
.art-content-inner.main .obj.spark.spark-1 {
top: 77px;
left: 71px;
width: 25px;
animation-delay: 1.2s;
filter: drop-shadow(-2px 10px 0 rgba(0, 0, 0, 0.2));
}
.art-content-inner.main .obj.spark.spark-2 {
bottom: 33px;
left: 258px;
width: 15px;
filter: drop-shadow(-2px 10px 0 rgba(0, 0, 0, 0.2));
}
.art-content-inner.main .obj.spark.spark-3 {
bottom: -20px;
left: 257px;
width: 38px;
animation-delay: 1.2s;
filter: drop-shadow(-2px 10px 0 rgba(0, 0, 0, 0.2));
}
.art-content-inner.main .obj.spark.spark-4 {
top: 101px;
right: 240px;
width: 27px;
}
.art-content-inner.main .obj.spark.spark-5 {
bottom: 63px;
right: 66px;
width: 46px;
animation-delay: 1.2s;
}
.art-content-inner.main .obj.spark.spark-6 {
top: 0;
left: 83px;
width: 26px;
filter: drop-shadow(-2px 10px 0 rgba(0, 0, 0, 0.2));
}
.art-content-inner.main .obj.spark.spark-7 {
bottom: 10px;
right: 154px;
width: 39px;
animation-delay: 1.4s;
}
.art-content-inner.main .obj.cloud {
bottom: 0;
animation: fade-in 1s ease-in-out forwards;
animation-delay: 0.2s;
transform: translateY(320px);
}
.art-content-inner.main .obj.cloud-1 {
left: 0;
width: 248px;
z-index: 4;
animation-delay: 0.3s;
}
.art-content-inner.main .obj.cloud-2 {
left: 100px;
width: 386px;
z-index: 3;
}
.art-content-inner.main .obj.cloud-3 {
right: 0;
width: 320px;
z-index: 2;
animation-delay: 0.4s;
}
.art-content-inner.main .obj.cloud-4 {
bottom: 32px;
right: 0;
width: 140px;
z-index: 1;
}
/* count-down */
.art-content-inner.timer {
padding: 80px 0;
}
.art-content-inner.timer .txt.sub {
font-family: 'Noto Sans KR', sans-serif !important;
font-size: 28px;
font-weight: 800;
line-height: 1;
padding-bottom: 34px;
}
#countDown {
display: flex;
justify-content: center;
gap: 20px;
font-family: 'Radio Canada', sans-serif !important;
font-size: 70px;
font-weight: 600;
}
#countDown li {
min-width: 20%;
}
#countDown li:not(:first-child) .number {
position: relative;
}
#countDown li:not(:first-child) .number::before {
content: ':';
position: absolute;
left: -18px;
top: 50%;
transform: translateY(-50%);
font-size: 60px;
}
#countDown .label {
color: #444;
font-size: 20px;
font-weight: 400;
letter-spacing: -0.05em;
}
</style>
<!-- s : art-container-event -->
<div class="art-container-event">
<div class="art-content-inner main">
<div class="obj header"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/header.png" /></div>
<p class="txt date" id="evtDate"> </p>
<div class="main-tit">
<div class="flash-deal"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/gs/title.png" /></div>
<div class="obj lightning lightning-1"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/gs/lightning-1.png" /></div>
<div class="obj lightning lightning-2"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/gs/lightning-2.png" /></div>
<div class="obj spark spark-1"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/spark-1.png" /></div>
<div class="obj spark spark-2"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/spark-2.png" /></div>
<div class="obj spark spark-3"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/spark-3.png" /></div>
<div class="obj spark spark-4"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/spark-4.png" /></div>
<div class="obj spark spark-5"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/spark-5.png" /></div>
<div class="obj spark spark-6"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/spark-6.png" /></div>
<div class="obj spark spark-7"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/spark-7.png" /></div>
</div>
<p class="txt sub" id="inputTxt"> </p>
<div class="obj cloud cloud-1"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/cloud-1.png" /></div>
<div class="obj cloud cloud-2"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/cloud-2.png" /></div>
<div class="obj cloud cloud-3"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/cloud-3.png" /></div>
<div class="obj cloud cloud-4"><img alt="" src="https://image.a-rt.com/art/managing/template/flash-deal/cloud-4.png" /></div>
</div>
<div class="art-content-inner timer">
<p class="txt sub">혜택 종료까지 남은 시간</p>
<ul class="move-up" id="countDown">
<li>
<div class="number" id="countDay"> </div>
<div class="label">Days</div>
</li>
<li>
<div class="number" id="countHour"> </div>
<div class="label">hours</div>
</li>
<li>
<div class="number" id="countMin"> </div>
<div class="label">minutes</div>
</li>
<li>
<div class="number" id="countSec"> </div>
<div class="label">seconds</div>
</li>
</ul>
</div>
</div>
<!-- e : art-container-event --><!-- 이미지맵 반응형 스크립트 --><script>
function fixImageMaps(force) {
var imgs = document.querySelectorAll('img[usemap]');
[].forEach.call(imgs, function (img) {
if (!img.naturalHeight) {
return;
}
var h = img.height / img.naturalHeight;
var w = img.width / img.naturalWidth;
var map = document.getElementsByName(img.useMap.slice(1))[0];
if (!map) {
return;
}
for (var i = 0; i < map.children.length; i++) {
var area = map.children[i];
if (!area.coords) {
continue;
}
var coords = area.coords;
if (!area.originalCoords) {
area.originalCoords = coords;
} else {
coords = area.originalCoords;
}
var split = coords.split(',');
var fixed = '';
split.forEach(function (coord, n) {
if (n != 0) {
fixed += ',';
}
fixed += n % 2 == 0 ? Number(coord) * w : Number(coord) * h;
});
area.coords = fixed;
}
});
}
window.onresize = fixImageMaps;
window.onload = fixImageMaps;
setInterval(fixImageMaps, 100);
</script><!-- 텍스트 및 카운트다운 제어 --><script>
window.onload = function () {
const from = '2024-11-25 15:00:00';
const to = '2024-11-27 23:59:59';
const txtMain = '11월 마지막 특가';
const txtSpot = '~78%';
const txtSub = '즉시 할인 프로모션';
function getSchedule() {
const fromMonth = new Date(from).getMonth() + 1;
const fromDay = new Date(from).getDate();
const toMonth = new Date(to).getMonth() + 1;
const toDay = new Date(to).getDate();
document.querySelector('#evtDate').innerText = `${fromMonth}.${fromDay} - ${toMonth}.${toDay}`;
}
function getText() {
document.querySelector('#inputTxt').innerHTML = `${txtMain} <br /><span class="spot">${txtSpot}</span> ${txtSub}`;
}
function getClock() {
const now = new Date();
const end = new Date(to);
let gap = end - now;
if (gap < 0) gap = 0;
const gapDay = String(Math.floor(gap / (1000 * 60 * 60 * 24))).padStart(2, '0');
const gapHour = String(Math.floor((gap / (1000 * 60 * 60)) % 24)).padStart(2, '0');
const gapMin = String(Math.floor((gap / (1000 * 60)) % 60)).padStart(2, '0');
const gapSec = String(Math.floor((gap / 1000) % 60)).padStart(2, '0');
document.querySelector('#countDay').innerText = `${gapDay}`;
document.querySelector('#countHour').innerText = `${gapHour}`;
document.querySelector('#countMin').innerText = `${gapMin}`;
document.querySelector('#countSec').innerText = `${gapSec}`;
}
getSchedule();
getText();
getClock();
setInterval(getClock, 1000);
};
</script><!-- E : 이벤트 복사영역 여기까지 -->