<!DOCTYPE html
>
<
html
>
<
head
>
<
meta
charset=
"utf-8"
/>
<
meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<
title
>超链接默认状态下的样式
</
title
>
<
meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<
link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"main.css"
/>
<
script
src=
"main.js"
>
<
/
script
>
<
style
>
/* a{}与a:link{}实
超链接默认状态下的样式现的效果是一样的 */
a:link{
color:
blue;
}
/* 鼠标放到超链接上的样式 */
a:hover{
color:
yellow;
text-decoration:
springgreen;
}
/* 超链接激活状态下的样式 点击的时候*/
a:active{
color:
black;
}
/* 超链接访问过后的样式*/
a:visited{
color:
red;
}
/* 获取焦点(光标)的时候的样式*/
a:focus{
color:
springgreen;
}
<
/
style
>
</
head
>
<
body
>
<
a
href=
"#"
>超链接颜色的变化
</
a
>
</
body
>
</
html
>