CSS Links 스타일 링크
CSS Links
스타일 링크
링크는 모든 CSS 속성 (예와 스타일 수 color, font-family, background등).
예
a {
color: hotpink;
}
<!DOCTYPE html>
<html>
<head>
<style>
a {
color: hotpink;
}
</style>
</head>
<body>
<p><b><a href="default.asp" target="_blank">This is a link</a></b></p>
</body>
</html>
또한 링크의 상태 에 따라 다르게 스타일을 지정할 수 있습니다 .
네 개의 링크 상태는 다음과 같습니다.
a:link - 정상적인 방문하지 않은 링크
a:visited - 사용자가 방문한 링크
a:hover - 사용자가 마우스를 올려 놓을 때의 링크
a:active - 클릭 한 순간의 링크
예
/* unvisited link */
a:link {
color: red;
}
/* visited link */
a:visited {
color: green;
}
/* mouse over link */
a:hover {
color: hotpink;
}
/* selected link */
a:active {
color: blue;
}

<!DOCTYPE html>
<html>
<head>
<style>
/* unvisited link */
a:link {
color: red;
}
/* visited link */
a:visited {
color: green;
}
/* mouse over link */
a:hover {
color: hotpink;
}
/* selected link */
a:active {
color: blue;
}
</style>
</head>
<body>
<p><b><a href="default.asp" target="_blank">This is a link</a></b></p>
<p><b>Note:</b> a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective.</p>
<p><b>Note:</b> a:active MUST come after a:hover in the CSS definition in order to be effective.</p>
</body>
</html>
게시판 목록
퍼블리셔팁
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 1187 | 기타 | 6년 전 | 2276 | ||
| 1186 | 기타 | 6년 전 | 2109 | ||
| 1185 | 기타 | 6년 전 | 2109 | ||
| 1184 | 기타 | 6년 전 | 2115 | ||
| 1183 | 기타 | 6년 전 | 1872 | ||
| 1182 | 기타 | 6년 전 | 2153 | ||
| 1181 | 기타 | 6년 전 | 1740 | ||
| 1180 | 기타 | 6년 전 | 1943 | ||
| 1179 | 기타 | 6년 전 | 2145 | ||
| 1178 | 기타 | 6년 전 | 2233 | ||
| 1177 | 기타 | 6년 전 | 1765 | ||
| 1176 | 기타 | 6년 전 | 1621 | ||
| 1175 | 기타 | 6년 전 | 2092 | ||
| 1174 | 기타 | 6년 전 | 1655 | ||
| 1173 | 기타 | 6년 전 | 1500 | ||
| 1172 | 기타 | 6년 전 | 1684 | ||
| 1171 | 기타 | 6년 전 | 1375 | ||
| 1170 | 기타 | 6년 전 | 1557 | ||
| 1169 | 기타 | 6년 전 | 1290 | ||
| 1168 | 기타 | 6년 전 | 1413 | ||
| 1167 | 기타 | 6년 전 | 1282 | ||
| 1166 | 기타 | 6년 전 | 1600 | ||
| 1165 | 기타 | 6년 전 | 1343 | ||
| 1164 | 기타 | 6년 전 | 1658 | ||
| 1163 | 기타 | 6년 전 | 1629 | ||
| 1162 | 기타 | 6년 전 | 1589 | ||
| 1161 | 기타 | 6년 전 | 3424 | ||
| 1160 | 기타 | 6년 전 | 3099 | ||
| 1159 | 기타 | 7년 전 | 2212 | ||
| 1158 | 기타 | 7년 전 | 1906 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기