How to add additional styles to hyperlinks

Example analysis:

● Set different font colors for links in different states.

a.one:link {color:#ff0000;}

a.one:visited {color:#0000ff;}

a.one:hover {color:#ffcc00;}

##● Set different font sizes and colors for links in different states .

a.two:link {color:#ff0000;}

a.two:visited {color:#0000ff;}

a.two:hover {font-size:150%;}

##● Set different background colors for links in different states .

a.three:link {color:#ff0000;}

a.three:visited {background:#0000ff;}

a.three:hover {background:#66ff66;}

● Set different font styles or font colors for links in different states .

a.four:link {color:#ff0000;}

a.four:visited {color:#0000ff;}

a.four:hover {font-family:Georgia, serif;}

● The link displays or removes the underline in different states.

a.five:link {color:#ff0000;text-decoration:none;}

a.five:visited {color: #0000ff;text-decoration:none;}

##a.five:hover {text-decoration:underline;color:coral;}

Continuing Learning
||
php中文网(php.cn)

将鼠标移至链接上改变样式.

这个链接改变颜色

这个链接改变字体大小

这个链接改变背景颜色

这个链接改变字体类型

这个链接改变文字修饰

submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!