css基本選擇器定義 active 元素屬性 套用樣式
支援CSS1 以上
用法::active
說明:按下 tag 套用樣式
css定義:
按下 a tag 套用樣式
a:active {
font-size: 20px; 字型20像素
color: blue; 字顏色blue
background-color: yellow; 背景色 yellow
}
程式:
<!DOCTYPE html>
<html>
<head>
<title>css基本定義 :active 元素屬性 套用樣式</title>
<meta http-equiv="Content-Type" content="text/html; charset=BIG5">
<style type="text/css">
a:active {
font-size: 20px;
color: blue;
background-color: yellow;
}
</style>
</head>
<body>
<a href="#">點我</a><br>
<a href="#">點我點我</a>
</body>
</html>
圖:
測試結束~
如果還不了解可參考:w3schools CSS Selector Reference
感謝~
- 首頁
- JAVA 目錄
- JAVA WEB 目錄
- JAVA 其他未分類 目錄
- Grails目錄
- jQuery 目錄
- Apache 目錄
- JavaScript 目錄
- Spring + Hibernate 目錄
- Hibernate 目錄
- Linux 目錄
- 程式開發工具目錄
- MySQL 目錄
- PHP目錄
- C/C++ 目錄
- Google App Engine 目錄
- HTML5/CSS3
- 程式開發基本資訊
- Android
- Oracle 目錄
- Struts 目錄