½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
happycgi
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > CSS > ¸Þ´º > ±ò²ûÇÑ ¸ð¹ÙÀÏ ÅÇ ¸Þ´º Tab Menu »ó¼¼Á¤º¸
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
PHP
ASP
CSS
html
mysql
jquery
image
API
Mobile
¸Þ´º
slide
°Ô½ÃÆÇ
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
±ò²ûÇÑ ¸ð¹ÙÀÏ ÅÇ ¸Þ´º Tab Menu
¼Ò½ºÅë°èÁ¤º¸ ¿À·ù½Å°í ¹× ¹®ÀÇ
ÇØÇÇÆÀ
³×ƼÁð
Æ®À§ÅÍ·Î º¸³»±â ÆäÀ̽ººÏÀ¸·Î º¸³»±â
¼Ò½ººÐ·ù ¸Þ´º
´Ù¿î·Îµå Ƚ¼ö 0 ȸ
°£´Ü¼³¸í Ŭ¸¯ÇÏ¸é ¾ÆÀÌÄÜ°ú ÇÔ²² ÇÏÀ̶óÀÌÆ®µÇ´Â ÅÇ ¸Þ´ºÀÔ´Ï´Ù
Æò°¡Çϱâ ÈǸ¢ÇÔ ¸Å¿ìÁÁÀ½ ÁÁÀ½ ±¦ÂúÀ½ º¸Åë º°·Î
ȨÆäÀÌÁö¹Ù·Î°¡±â ¼Ò½º´Ù¿î·Îµå µ¥¸ð ¹Ì¸®º¸±â ½ºÅ©·¦Çϱâ
  

Ŭ¸¯ÇÏ¸é ¾ÆÀÌÄÜ°ú ÇÔ²² ÇÏÀ̶óÀÌÆ®µÇ´Â ÅÇ ¸Þ´ºÀÔ´Ï´Ù.
È°¿ëµµ°¡ ³ô¾Æ ´Ù¾çÇÑ »çÀÌÆ®¿¡¼­ »ç¿ë °¡´ÉÇÕ´Ï´Ù.


HTML ±¸Á¶

    <div class="tab-menu">


        <ul class="tab-menu__list">


            <li class="tab-menu__item tab-menu__active">

                <span class="tab-menu__icon"><i class="ri-home-line"></i></span>

                <span class="tab-menu__text">Home</span>

            </li>


            <li class="tab-menu__item">

                <span class="tab-menu__icon"><i class="ri-heart-3-line"></i></i></span>

                <span class="tab-menu__text">Likes</span>

            </li>


            <li class="tab-menu__item">

                <span class="tab-menu__icon"><i class="ri-search-line"></i></span>

                <span class="tab-menu__text">Search</span>

            </li>


            <li class="tab-menu__item">

                <span class="tab-menu__icon"><i class="ri-user-line"></i></span>

                <span class="tab-menu__text">Profile</span>

            </li>

        </ul>


    </div>


    <a href="https://www.youtube.com/watch?v=dtGTN7kld0c" target="_blank" class="btn-watch-now">

        <i class="ri-youtube-fill"></i>

    </a>


    <script src="script.js"></script>


</body>



CSS ¼Ò½º

 *,

*::after,

*::after{

    padding: 0;

    margin: 0;

    box-sizing: border-box;

}


:root{

    --color-primary :#19adbb;

    --color-primary-ligth : rgba(34, 167, 179, 0.2);

    --color-secondary : #f7f7f7;

}


body{

    font-family: Arial, Helvetica, sans-serif;

    background-color: var(--color-primary);

    display: grid;

    place-items: center;

    min-height: 100vh;

}



.tab-menu{

    border-radius: 10rem;

    padding: 1rem 2rem;

    background-color: var(--color-secondary);

    box-shadow: 0 0 1rem rgba(0,0,0,.1);

}



.tab-menu__list{

    list-style: none;

    display: flex;

    gap: 2rem;

    justify-content: space-between;

}



.tab-menu__item{

    display: flex;

    gap: .5rem;

    align-items: center;

    color: #222;

    border-radius: 4rem;

    font-size: 1.2rem;

    padding: 1rem;

    transition: all .4s cubic-bezier(0.165, 0.84, 0.44, 1);

    cursor: pointer;

}


.tab-menu__icon{

    transform: translateY(2px);

}


.tab-menu__text{

    display: none;

}


.tab-menu__active{

    padding: 1rem 2rem;

    color: var(--color-primary);

    background-color: var(--color-primary-ligth)

}


.tab-menu__active .tab-menu__text{

    display: block;

}


.btn-watch-now{

    position: fixed;

    bottom: 3rem;

    right: 3rem;

    text-decoration: none;

    width: 5rem;

    height: 5rem;

    display: flex;

    justify-content: center;

    align-items: center;

    border-radius: 50%;

    font-size: 2.4rem;

    color: red;

    background-color: #fff;

}


.btn-watch-now::after,

.btn-watch-now::before{

    content: '';

    position: absolute;

    width: inherit;

    height: inherit;

    border-radius: inherit;

    left: 50%;

    top:50%;

    transform: translate(-50%,-50%);

    border: 2px solid #fff;

    animation: scaling 1s infinite;

    z-index: -1;

}



.btn-watch-now::before{

    animation: scaling 1s .2s infinite;

}



@keyframes scaling {

    0%{

        transform: translate(-50%,-50%) scale(1);

    }


    100%{

        transform: translate(-50%,-50%) scale(1.2);

        opacity: 0;

    }

}


JS ¼Ò½º

const menuItems = document.querySelectorAll('.tab-menu__item');


let previousSelectedItem = menuItems[0];


menuItems.forEach(item => {

    item.addEventListener('click', () => {

        previousSelectedItem?.classList.remove('tab-menu__active')

        previousSelectedItem = item;

        item.classList.add('tab-menu__active');

    })

})


÷ºÎÆÄÀÏÀ» ´Ù¿î·Îµå ¹Þ°Å³ª ÇØ´ç »çÀÌÆ®·Î À̵¿Çؼ­ Àüü ¼Ò½º¸¦ È®ÀÎÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.
³×ƼÁð ÀÇ°ß   ÀÌ¿ëÇϽŠÀÚ·áÀÇ Èı⸦ ÀÚÀ¯·Ó°Ô ÀÛ¼ºÇϼ¼¿ä. (»ó¾÷ÀûÀÎ ±¤°í ¹× µµ¹è¼º ±Û µîÀº »çÀüÅ뺸¾øÀÌ »èÁ¦µÉ ¼ö ÀÖ½À´Ï´Ù.)
³»¿ë ¾ÆÀ̵ð ÀÇ°ß³²±â±â
µî·ÏµÈ ÀÇ°ßÀÌ ¾ø½À´Ï´Ù.
1
À̸§
³»¿ë
:³×¸Â¾Æ¿ä: :È­³ª´Â±º¿ä: :Àá¿Í: :¿ì¿ïÇØ: :À̰ǾƳÄ: :¿ÕÇÏÇÏ: ¿Õ¿ôÀ½~ ³î·¥~
Æò°¡Çϱâ ÈǸ¢ÇÔ ¸Å¿ìÁÁÀ½ ÁÁÀ½ ±¦ÂúÀ½ º¸Åë º°·Î
µµ¹è¹æÁöÅ°
 76854630 º¸ÀÌ´Â µµ¹è¹æÁöÅ°¸¦ ÀÔ·ÂÇϼ¼¿ä.