작성
·
165
1
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>pseudo Example 1</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="gnb">
<a href="#none">Online Class</a>
</div>
</body>
</html>
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@1,300&display=swap');
@keyframes jelly{
0% , 100% {
transform: translateY(0);
}
33.3333% {
transform: translateY(-10%);
}
66.6666% {
transform: translateY(10%);
}
}
body {
font-family: 'Raleway', sans-serif;
font-size: 18px;
color: white;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
margin: 0;
}
.gnb{
}
.gnb a{
text-decoration: none;
color: black;
vertical-align: middle;
}
.gnb a::before{
display:inline-block;
width: 25px;
height: 25px;
content: '06';
color: white;
text-align: center;
vertical-align: middle;
font-size: 15px;
line-height: 25px;
background-color: dodgerblue;
border-radius: 50%;
margin-right: 5px;
}
.gnb:hover a::before , .gnb:hover a::after{
animation: jelly .5s linear infinite;
}
.gnb a::after{
display:inline-block;
content: 'updated 👀';
padding: 0px 5px;
margin-left: 7px;
background-color: red;
color: white;
border-radius: 3px;
}
답변 1
0
제가 드린 해결책인 transform: translateY(-3px) 을 알려주셨는데 왜 -3px인지 궁금합니다라고 하셨는데... 올리신 코드는 올리신 코드에 없네요. 왜 transform: translateY(-3px) 이걸 주라고 하는지는 코드를 넣어보시면 바로 알텐데 안해보신 듯 하네요.
궁금한건 언제든 질문해도 되지만 앞으로는 본인이 할 수 있는 부분은 최선을 다해 보시고 질문해주세요.
그리고 수업내용이 아닌 내용을 질문하시면서 너무 당연하게 질문하시는데... 다른 분들은 수업내용이 아닌 부분 질문할 때 굉장히 조심스럽게 질문합니다. 참고해주세요...
네 ㅋㅋ 참고 잘할게요