๐Ÿ”์• ๋‹ˆ๋ฉ”์ด์…˜ ๋ฉ”๋‰ด ํ† ๊ธ€ ๋ฒ„ํŠผ | HTML CSS ๋ฐ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ

8249 ๋‹จ์–ด csshtmlbeginnersjavascript
์• ๋‹ˆ๋ฉ”์ด์…˜ ๋ฉ”๋‰ด ํ† ๊ธ€ ๋ฒ„ํŠผ ๋งŒ๋“ค๊ธฐ | Html CSS ๋ฐ Javascript, ์ฒ˜์Œ๋ถ€ํ„ฐ ๋‹จ๊ณ„๋ณ„๋กœ.





์†Œ์Šค ์ฝ”๋“œ:

๊ฐ„๋‹จํ•œ ๋งˆํฌ์—…:


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Animated Menu Toggle Button</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>

<div class="toggle">
    <span></span>
    <span></span>
    <span></span>
</div>

<script src="app.js"></script>
</body>
</html>


๊ทธ๋Ÿฐ ๋‹ค์Œ ๋ช‡ ์ค„์˜ CSS:

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #e9ecef;
}

.toggle{
    position: relative;
    width: 70px;
    height: 70px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
}

.toggle span{
    position: absolute;
    width: 40px;
    height: 4px;
    background: #4263eb;
    border-radius: 4px;
    transition: 0.5s;
}

.toggle span:nth-child(1){
    transform: translateY(-15px);
    width: 25px;
    left: 15px;
}

.toggle.active span:nth-child(1){
    width: 40px;
    transform: translateY(0px) rotate(45deg);
    transition-delay: 0.125s;
}

.toggle span:nth-child(2){
    transform: translateY(15px);
    width: 15px;
    left: 15px;
}

.toggle.active span:nth-child(2){
    width: 40px;
    transform: translateY(0px) rotate(315deg);
    transition-delay: 0.25s;

}

.toggle.active span:nth-child(3){
    transform: translateX(60px);
}


YouTube์—์„œ ํŒ”๋กœ์šฐํ•˜์„ธ์š”.
https://bit.ly/3oBQbc0

์ข‹์€ ์›นํŽ˜์ด์ง€ ์ฆ๊ฒจ์ฐพ๊ธฐ