Link

Link는 CSS 속성으로 스타일링 할 수 있다. 추가로 상태까지 다르게 스타일링 할 수 있다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* 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;
}

❗️주의사항

  • a:hover는 무조건 a:link, a:visited 이후에 와야한다.
  • a:active는 무조건 a:hover 이후에 와야한다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
a:link,
a:visited {
background-color: #f44336;
color: white;
padding: 14px 25px;
text-align: center;
text-decoration: none;
display: inline-block;
}

a:hover,
a:active {
background-color: red;
}

linkbutton