📄 pr_pseudo_link.asp@output=print
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS :link pseudo-class</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />
<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</head>
<body>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
<h1>CSS :link pseudo-class</h1>
<hr />
<a href="css_reference.asp"><img class="navup" src="../images/up.gif" alt="CSS Reference" border="0" /> Complete CSS Reference</a>
<hr />
<h2>Definition</h2>
<p>The :link pseudo-class adds a special style to an unvisited link.</p>
<h2>Examples</h2>
<p>A link that is active, visited, unvisited, or when you mouse over a link can
all be displayed in different ways
in a CSS-supporting browser:</p>
<table width="100%" border="1" class="ex" cellspacing="0" id="table1"><tr><td>
<pre>a:link {color: #FF0000} /* unvisited link */
a:visited {color: #00FF00} /* visited link */
a:hover {color: #FF00FF} /* mouse over link */
a:active {color: #0000FF} /* selected link */</pre>
</td></tr></table>
<p><b>Note:</b> a:hover MUST come after a:link and a:visited in the CSS
definition in order to be effective!!</p>
<p><b>Note:</b> a:active MUST come after a:hover in the CSS
definition in order to be effective!!</p>
<p><b>Note:</b> Pseudo-class names are not case-sensitive.</p>
<p><b>Note:</b> Pseudo-classes can be also be combined with CSS classes: </p>
<table width="100%" border="1" class="ex" cellspacing="0" id="table2"><tr><td>
<pre>a.red:visited {color: #FF0000}</pre>
<pre><a class="red" href="css_syntax.asp">CSS Syntax</a></pre>
</td></tr></table>
<p>If the link in the example above has been visited, it will be displayed in red.</p>
<hr />
<h2>Try-It-Yourself Demos</h2>
<p><a target="_blank" href="tryit.asp@filename=trycss_link">Hyperlink</a><br />
This example demonstrates how to add different colors to a hyperlink in a
document.</p>
<p><a target="_blank" href="tryit.asp@filename=trycss_link2">Hyperlink 2</a><br />
This example demonstrates how to add other styles to hyperlinks.</p>
<hr />
<a href="css_reference.asp"><img class="navup" src="../images/up.gif" alt="CSS Reference" border="0" /> Complete CSS Reference</a>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -