๐๋ฐ์ค ๋งํฌ ํธ๋ฒ ํจ๊ณผ ๊ทธ๋ฆฌ๋ ๋ฐฉ๋ฒ | 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>Cool Underline Hover Effects</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav>
<ul>
<li><a href="#"></a>Home</li>
<li><a href="#"></a>Services</li>
<li><a href="#"></a>Contact</li>
<li><a href="#"></a>About</li>
</ul>
</nav>
</body>
</html>
CSS
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');
*,
*::before,
*::after {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
background-color: #0a0a0a;
color: rgb(226, 226, 226);
}
ul {
height: 100vh;
width: 70vw;
min-width: 600px;
display: flex;
align-items: center;
justify-content: space-around;
margin: auto;
}
li {
position: relative;
list-style: none;
font-family: 'Poppins', sans-serif;
color: #a0a0a0;
font-size: 18px;
letter-spacing: 0.5px;
padding: 0 10px;
}
li::after {
content: '';
position: absolute;
background-color: #ff3c78;
height: 3px;
width: 0;
left: 0;
bottom: -8px;
transition: all 0.5s ease;
}
li:hover {
color: #fff;
}
li:hover::after {
width: 100%;
}
๐ด ํ๋ก์ฐ:
์ ํ๋ธ: https://bit.ly/3oBQbc0
ํ์ด์ค๋ถ: https://bit.ly/3cp2S5W
์ธ์คํ๊ทธ๋จ{์ ๊ท}: https://bit.ly/3Ihh2EB
Reference
์ด ๋ฌธ์ ์ ๊ดํ์ฌ(๐๋ฐ์ค ๋งํฌ ํธ๋ฒ ํจ๊ณผ ๊ทธ๋ฆฌ๋ ๋ฐฉ๋ฒ | HTML ๋ฐ CSSโ๏ธ), ์ฐ๋ฆฌ๋ ์ด๊ณณ์์ ๋ ๋ง์ ์๋ฃ๋ฅผ ๋ฐ๊ฒฌํ๊ณ ๋งํฌ๋ฅผ ํด๋ฆญํ์ฌ ๋ณด์๋ค https://dev.to/robsonmuniz16/how-to-draw-underline-link-hover-effect-html-css-16aiํ ์คํธ๋ฅผ ์์ ๋กญ๊ฒ ๊ณต์ ํ๊ฑฐ๋ ๋ณต์ฌํ ์ ์์ต๋๋ค.ํ์ง๋ง ์ด ๋ฌธ์์ URL์ ์ฐธ์กฐ URL๋ก ๋จ๊ฒจ ๋์ญ์์ค.
์ฐ์ํ ๊ฐ๋ฐ์ ์ฝํ ์ธ ๋ฐ๊ฒฌ์ ์ ๋ (Collection and Share based on the CC Protocol.)
์ข์ ์นํ์ด์ง ์ฆ๊ฒจ์ฐพ๊ธฐ
๊ฐ๋ฐ์ ์ฐ์ ์ฌ์ดํธ ์์ง
๊ฐ๋ฐ์๊ฐ ์์์ผ ํ ํ์ ์ฌ์ดํธ 100์ ์ถ์ฒ ์ฐ๋ฆฌ๋ ๋น์ ์ ์ํด 100๊ฐ์ ์์ฃผ ์ฌ์ฉํ๋ ๊ฐ๋ฐ์ ํ์ต ์ฌ์ดํธ๋ฅผ ์ ๋ฆฌํ์ต๋๋ค