css 질문입니다.
본문
이게 맞는 문법인가요?
<style>
menu {font-family: "나눔고딕";color:#000; font-size:14px;}
a:link {
color: #000;
text-decoration: none;
}
a:visited {
color: #000;
text-decoration: none;
}
a:hover {
color: #000;
text-decoration: none;
}
a:active {
color: #000;
text-decoration: none;
}
</style>
폰트에 볼드를 주고싶고 각이벤트에 동일한폰트(볼드, 14px)에 색상만 바꾸고 싶습니다. 방법이 있나요?
현재는 페이지의 모든링크들이 동일하게 적용됩니다. menu에만 링크,호버, 액티브, 비지트값을 주고싶습니다. 어떻게 묶는지 잘 모르겠습니다. 고수님 알려주세요 부탁드립니다.
답변 1
a.test:link { text-decoration:none; }
a.test:visited { }
a.test:hover { text-decoration:underline; }
a.test:active { }
<ul>
<li><a href="#" class="test">test</a></li>
<li>test</li>
</ul>
클래스명을 저렇게 넣으면 됩니다.
답변을 작성하시기 전에 로그인 해주세요.