0010-偽類選擇器-前端學習筆記
阿新 • • 發佈:2018-04-05
put class hover 元素 HA 偽類選擇器 lec selection 鼠標滑過
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> /*偽類選擇器,專門用來表示元素的一種狀態 *比如訪問過的鏈接::visited *正常鏈接 :link *鼠標滑過的鏈接 :hover *正在點擊的鏈接 :active *獲取焦點 :focus *選中狀態 ::selection 火狐瀏覽器為::-moz-selection;*/ a:link{color: red;} a:visited{color:yellow;} input:focus{background-color:blue;} </style> </head> <body> <a href="http://www.baidu.com" target="_blank">訪問過的鏈接</a> <br> <a href="http://www.baidu1234567.com" target="_blank">沒訪問過的鏈接</a> <br> 使用input創建一個文本輸入框 <input type="text"> </body> </html>
Document
訪問過的鏈接
沒訪問過的鏈接
使用input創建一個文本輸入框
0010-偽類選擇器-前端學習筆記