๐๋ฉ์ง ํธ๋ฒ ํจ๊ณผ๋ก ๋ฒํผ์ ๋ง๋๋ ๋ฐฉ๋ฒ 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
Reference
์ด ๋ฌธ์ ์ ๊ดํ์ฌ(๐๋ฉ์ง ํธ๋ฒ ํจ๊ณผ๋ก ๋ฒํผ์ ๋ง๋๋ ๋ฐฉ๋ฒ 02 | HTML๊ณผ CSSโจ), ์ฐ๋ฆฌ๋ ์ด๊ณณ์์ ๋ ๋ง์ ์๋ฃ๋ฅผ ๋ฐ๊ฒฌํ๊ณ ๋งํฌ๋ฅผ ํด๋ฆญํ์ฌ ๋ณด์๋ค https://dev.to/robsonmuniz16/how-to-make-a-button-with-awesome-hover-effects-02-html-css-3m2eํ ์คํธ๋ฅผ ์์ ๋กญ๊ฒ ๊ณต์ ํ๊ฑฐ๋ ๋ณต์ฌํ ์ ์์ต๋๋ค.ํ์ง๋ง ์ด ๋ฌธ์์ URL์ ์ฐธ์กฐ URL๋ก ๋จ๊ฒจ ๋์ญ์์ค.
์ฐ์ํ ๊ฐ๋ฐ์ ์ฝํ ์ธ ๋ฐ๊ฒฌ์ ์ ๋ (Collection and Share based on the CC Protocol.)
์ข์ ์นํ์ด์ง ์ฆ๊ฒจ์ฐพ๊ธฐ
๊ฐ๋ฐ์ ์ฐ์ ์ฌ์ดํธ ์์ง
๊ฐ๋ฐ์๊ฐ ์์์ผ ํ ํ์ ์ฌ์ดํธ 100์ ์ถ์ฒ ์ฐ๋ฆฌ๋ ๋น์ ์ ์ํด 100๊ฐ์ ์์ฃผ ์ฌ์ฉํ๋ ๊ฐ๋ฐ์ ํ์ต ์ฌ์ดํธ๋ฅผ ์ ๋ฆฌํ์ต๋๋ค