专注前端素材!
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>素材8网教程(study.sucai8.cn)</title> <style> a.ex1:hover,a.ex1:active {color:red;} a.ex2:hover,a.ex2:active {font-size:150%;} a.ex3:hover,a.ex3:active {background:red;} a.ex4:hover,a.ex4:active {font-family:monospace;} a.ex5:visited,a.ex5:link {text-decoration:none;} a.ex5:hover,a.ex5:active {text-decoration:underline;} </style> </head> <body> <p>将鼠标移至链接上查看其样式改变.</p> <p><a class="ex1" href="/css/">这个链接改变颜色</a></p> <p><a class="ex2" href="/css/">这个链接改变字体大小</a></p> <p><a class="ex3" href="/css/">这个链接改变背景颜色</a></p> <p><a class="ex4" href="/css/">这个链接改变字体类型</a></p> <p><a class="ex5" href="/css/">这个链接改变文字修饰</a></p> </body> </html>
运行结果