์ด๋ฒ์๋ CSS๋ฅผ ์ด์ฉํ ๋งํฌ ๊ด๋ จ ์ค์ ์ ๋ํด์ ์์๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค.
-
:link Signifies unvisited hyperlinks.
-
:visited Signifies visited hyperlinks.
-
:hover Signifies an element that currently has the user's mouse pointer hovering over it.
-
:active Signifies an element on which the user is currently clicking.
์ด ๋งํฌ๊ด๋ จ ์์ฑ์ HTML๋ฌธ์์ ํค๋๋ถ๋ถ์ ์ ์๋ฅผ ํ์๋ฉด ๋ฉ๋๋ค. ๊ทธ๋ฆฌ๊ณ a:hover์์ฑ์ a:link ์ a:visited ๋ค์์ ์์ผ ํฉ๋๋ค. ๊ทธ๋ฆฌ๊ณ a:active์์ฑ์ a:hover์์ฑ ๋ค์์ ์์ผ ํฉ๋๋ค.
<style type="text/css">
a:link {color: #000000}
a:visited {color: #006600}
a:hover {color: #FFCC00}
a:active {color: #FF00CC}
</style>
# ์ฐธ๊ณ ๋ก ์๋ ์์ ๋ค์ ๋ค์ด๋ฒ ๋ธ๋ก๊ทธ ํน์ฑ์ ์คํ์ผ์ ๋จน์ง ์๊ณ ์์ต๋๋ค. ๊ฐ์ธ์ ์ผ๋ก html๋ฌธ์๋ฅผ ๋ง๋ค์ด์ ํ ์คํธ ํด๋ณด์๊ธฐ๋ฅผ ๊ถ์ฅํฉ๋๋ค.
๋งํฌ ๊ธฐ๋ณธ ์์ ์ค์
Following is the example which demonstrates how to set the link color. Possible value could be any color name in any valid format.
|
This will produce following black link:
Black Link |
๋ฐฉ๋ฌธํ๋ ๋งํฌ ์์ ์ค์
Following is the example which demonstrates how to set the color of visited links. Possible value could be any color name in any valid format.
|
This will produce following link. Once you will click this link, it will change its color to green.
Click this link |
๋ง์ฐ์ค hover์ ๋งํฌ ์์ ์ค์
Following is the example which demonstrates how to change the color of links when we bring a mouse pointer over that link. Possible value could be any color name in any valid format.
|
This will produce following link. Now you bring your mouse over this link and you will see that it changes its color to yellow.
Bring Mouse Here |
์กํฐ๋ธ ๋งํฌ ์์ ์ค์
Following is the example which demonstrates how to change the color of active links. Possible value could be any color name in any valid format.
|
This will produce following link. This will change it color to pink when user clicks it.
Click This Link |
Reference : http://www.tutorialspoint.com/css/css_links.htm
'๐ป Programming > CSS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[CSS] 12. Borders ( ํ ๋๋ฆฌ, ๋ณด๋ ์ค์ ) (0) | 2016.06.12 |
---|---|
[CSS] 11. Table ( ํ ์ด๋ธ ์ค์ ) (0) | 2016.06.12 |
[CSS] 9. Image ( ์ด๋ฏธ์ง ๊ด๋ จ ์ค์ ) (0) | 2016.06.12 |
[CSS] 8. Text ( ํ ์คํธ ์ค์ ) (0) | 2016.06.12 |
[CSS] 7. Fonts ( ํฐํธ ์ค์ ) (0) | 2016.06.12 |