var logoIcon = document.querySelector(".logo-icon"); var logoType01 = document.querySelector(".big-logo-type01"); var logoType02 = document.querySelector(".big-logo-type02"); logoIcon.addEventListener("mouseenter", function () { // ·Î°í ¾ÆÀÌÄܰú ¾ÆÀÌÄÜ ÄÁÅ×À̳ʸ¦ ÂüÁ¶ÇÕ´Ï´Ù. var iconContainer = document.querySelector(".intro-logo"); // ·Î°í ¾ÆÀÌÄܰú ¾ÆÀÌÄÜ ÄÁÅ×À̳ÊÀÇ ³Êºñ¿Í ³ôÀ̸¦ °¡Á®¿É´Ï´Ù. var iconWidth = logoIcon.offsetWidth; var iconHeight = logoIcon.offsetHeight; var containerWidth = iconContainer.offsetWidth; var containerHeight = iconContainer.offsetHeight; // ¾ÆÀÌÄÜÀÇ ³Êºñ¿Í ³ôÀ̸¦ Àý¹ÝÀ¸·Î ÁÙÀÔ´Ï´Ù. var newWidth = iconWidth - 100; var newHeight = iconHeight - 100; // ·Î°í ¾ÆÀÌÄܰú ¾ÆÀÌÄÜ ÄÁÅ×À̳ÊÀÇ Å©±â¸¦ º¯°æÇÏ´Â ¾Ö´Ï¸ÞÀ̼ÇÀ» Àû¿ëÇÕ´Ï´Ù. logoIcon.style.transition = "transform 1s ease, width 1s ease, height 1s ease"; iconContainer.style.transition = "width 1s ease, height 1s ease"; logoIcon.style.transform = "rotate(-90deg)"; logoIcon.style.width = newWidth + "px"; logoIcon.style.height = newHeight + "px"; iconContainer.style.width = (containerWidth - iconWidth + newWidth) + "px"; iconContainer.style.height = (containerHeight - iconHeight + newHeight) + "px"; // big-logo-type01À» ¼­¼­È÷ »ç¶óÁö°Ô ÇÏ°í ³ôÀ̸¦ 0À¸·Î ¸¸µì´Ï´Ù. logoType01.style.transition = "opacity 1s ease"; logoType01.style.opacity = "0"; // big-logo-type02¸¦ ¼­¼­È÷ º¸ÀÌ°Ô ÇÏ°í ³ôÀ̸¦ ¿ø·¡ ³ôÀÌ·Î ¸¸µì´Ï´Ù. logoType02.style.transition = "opacity 1s ease, gap 1s ease, left 1s ease, top 1s ease"; logoType02.style.opacity = "1"; logoType02.style.gap = "10px"; logoType02.style.left = "-10%"; logoType02.style.top = "calc(100% - 200px)"; }); // ·Î°í ¾ÆÀÌÄÜ¿¡¼­ ¸¶¿ì½º°¡ ¹þ¾î³µÀ» ¶§ÀÇ À̺¥Æ® ¸®½º³Ê¸¦ Ãß°¡ÇÕ´Ï´Ù. logoIcon.addEventListener("mouseleave", function () { var iconContainer = document.querySelector(".intro-logo"); // ·Î°í ¾ÆÀÌÄܰú ¾ÆÀÌÄÜ ÄÁÅ×À̳ÊÀÇ Ãʱâ Å©±â·Î µÇµ¹¸³´Ï´Ù. logoIcon.style.transition = "transform 1s ease, width 1s ease, height 1s ease"; logoIcon.style.transform = "rotate(0deg)"; logoIcon.style.width = ""; logoIcon.style.height = ""; iconContainer.style.transition = "width 1s ease, height 1s ease"; iconContainer.style.width = ""; iconContainer.style.height = ""; // big-logo-type02¸¦ ¼­¼­È÷ »ç¶óÁö°Ô ÇÏ°í ³ôÀ̸¦ 0À¸·Î ¸¸µì´Ï´Ù. logoType02.style.transition = "opacity 1s ease, gap 1s ease, left 1s ease, top 1s ease"; logoType02.style.opacity = "0"; logoType02.style.gap = ""; logoType02.style.top = ""; logoType02.style.left = ""; // big-logo-type01À» ¼­¼­È÷ º¸ÀÌ°Ô ÇÏ°í ³ôÀ̸¦ ¿ø·¡ ³ôÀÌ·Î ¸¸µì´Ï´Ù. logoType01.style.transition = "opacity 1s ease, height 1s ease"; logoType01.style.opacity = "1"; }); var beforeChildbirthContainer = document.getElementById("beforeChildbirthContainer"); if (beforeChildbirthContainer) { beforeChildbirthContainer.addEventListener("click", function (e) { window.location.href = "#"; }); } var postnatal = document.getElementById("postnatal"); if (postnatal) { postnatal.addEventListener("click", function (e) { window.location.href = "https://www.anidar.kr/bizdemo156792/anidar2/newborn.php"; }); } var beforeChildbirthContainerMobile = document.getElementById("beforeChildbirthContainerMobile"); if (beforeChildbirthContainerMobile) { beforeChildbirthContainerMobile.addEventListener("click", function (e) { window.location.href = "#"; }); } var postnatalM = document.getElementById("postnatalM"); if (postnatalM) { postnatalM.addEventListener("click", function (e) { window.location.href = "https://www.anidar.kr/bizdemo156792/anidar2/newborn.php"; }); } var symbolWeb= document.getElementById("symbol-web"); if (symbolWeb) { symbolWeb.addEventListener("click", function (e) { window.location.href = "#"; }); } var symbolMobile= document.getElementById("symbol-mobile"); if (symbolMobile) { symbolMobile.addEventListener("click", function (e) { window.location.href = "#"; }); }