1、僞類focus的做用php
一、用於給表單方框裏添加點擊特效 [IE不支持]css
<html> <head> <title>表單</title> <style type="text/css"> input:focus{ border:#0FF; solid:; background-color:#F00;} </style> </head> <body> <form caption="註冊.php" name="reg" method="post"> <table border="0" cellpadding="5" align="center" width="100"> <tr> <td>用戶名</td> <td><input type="text" name="uername"</td> </tr> <tr> <td>密 碼</td> <td><input type="password" name="mima"></td> </tr> <tr> <td align="center" colspan="1"><input type="submit" value="註冊"></td> <td align="center" colspan="50"><input type="submit" value="登陸"></td> </tr> </form> </body> </html>
2、僞類的語法html
input:focus{background:blue;}post
3、超連接僞類ui
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>無標題文檔</title> <style type="text/css"> a:link {color: #FF0000} /* 未訪問的連接 */ a:visited {color: #00FF00} /* 已訪問的連接 */ a:hover {color: #FF00FF} /* 鼠標移動到連接上 */ a:active {color: #0000FF} /* 選定的連接 */ </style> </head> <body> <p><a href="http://www.baodi.com">這是一個連接</a></p> </body> </html>