๐Ÿ“‡๋ฉ‹์ง„ ํ˜ธ๋ฒ„ ํšจ๊ณผ๋กœ ๋ฒ„ํŠผ์„ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ• 02 | HTML๊ณผ CSSโœจ

12089 ๋‹จ์–ด csswebdevhtmlbeginners
๋ฉ‹์ง„ ํ˜ธ๋ฒ„ ํšจ๊ณผ๋กœ ๋ฒ„ํŠผ์„ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ• 02 HTML ๋ฐ CSS๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋‹จ๊ณ„๋ณ„๋กœ.



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

๋งˆํฌ์—…:

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Button with Awesome Hover Effects</title>
  <link rel="stylesheet" href="style.css">
</head>

<body>
  <a href="#" class="green"><span>Button</span><i></i></a>
  <a href="#" class="blue"><span>Button</span><i></i></a>
  <a href="#" class="red"><span>Button</span><i></i></a>
</body>

</html>


์Šคํƒ€์ผ:

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #27282c;
    flex-direction: column;
    gap: 60px;
}

/* Colors */
.blue {
    --clr: #2979ff;
}
.green {
    --clr: #00c853;
}
.red {
    --clr: #f50057;
}

a {
    position: relative;
    background-color: #444;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1.5em;
    letter-spacing: 0.1em;
    padding: 10px 30px;
    border-radius: 2px;
    transition: all .5s ease;
}
a:hover {
    letter-spacing: 0.25em;
    background-color: var(--clr);
    color: var(--clr);
    box-shadow: 0 0 35px var(--clr);
}

a::before {
    content: '';
    position: absolute;
    inset: 2px;
    background-color: #27282c;
}

a span {
    position: relative;
    z-index: 1;
}

a i {
    position: absolute;
    inset: 0;
    display: block;
}
a i::before {
    content: '';
    position: absolute;
    border: 2px solid var(--clr);
    top: -3.5px;
    width: 10px;
    height: 5px;
    left: 80%;
    border-radius: 2px;
    background-color: #27282c;
    transition: all .5s ease;
}

a:hover i::before {
    width: 20px;
    left: 20%;
}

a i::after {
    content: '';
    position: absolute;
    border: 2px solid var(--clr);
    bottom: -3.5px;
    width: 10px;
    height: 5px;
    left: 20%;
    border-radius: 2px;
    background-color: #27282c;
    transition: all .5s ease;
}

a:hover i::after {
    width: 20px;
    left: 80%;
}


๐Ÿ›ด ๋” ๋งŽ์€ ์ •๋ณด๋ฅผ ์›ํ•˜์‹œ๋ฉด ์ €๋ฅผ ํŒ”๋กœ์šฐํ•˜์„ธ์š”:
์œ ํŠœ๋ธŒ: https://bit.ly/3oBQbc0
ํŽ˜์ด์Šค๋ถ: https://bit.ly/3cp2S5W
์ธ์Šคํƒ€๊ทธ๋žจ: https://bit.ly/3Ihh2EB

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