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>
게시글 목록
| 번호 | 제목 |
|---|---|
| 3133 |
CSS
수직 탐색 막대 예제
|
| 3132 | |
| 3131 |
CSS
Navigation Bars
|
| 3130 | |
| 3129 |
CSS
CSS 투명한 호버 효과 2
|
| 3128 |
CSS
CSS 투명한 호버 효과
|
| 3127 |
CSS
CSS 불투명도 / 투명성
|
| 3121 | |
| 3120 | |
| 3112 | |
| 3111 | |
| 3110 | |
| 3109 | |
| 3108 | |
| 3107 | |
| 3105 | |
| 3104 | |
| 3103 | |
| 3101 | |
| 3100 | |
| 3099 | |
| 3098 | |
| 3097 | |
| 3096 | |
| 3094 | |
| 3093 | |
| 3092 | |
| 3090 |
CSS
display:block
|
| 3089 |
CSS
Display: none;
|
| 3088 |
CSS
display 속성
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기