Property
|
Purpose
|
a:link
|
กำหนด style ให้กับ link ปกติ ที่ยังไม่เคยถูกคลิก
|
a:visited
|
กำหนด style ให้กับ link ที่เคยถูกคลิกแล้ว
|
a:hover
|
กำหนด style ให้กับ link เมื่อเลื่อนเมาส์ไปอยู่เหนือ link
|
a:active
|
กำหนด style ให้กับ link ขณะถูกคลิก
|
ตัวอย่าง
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
< style type="text/css">
.linkbox a:link {color: #FF0000} /* unvisited link สีแดง*/
.linkbox a:visited {color: #00FF00} /* visited link สีเขียว*/
.linkbox a:hover {color: #FF00FF} /* mouse over link สีชมพู */
.linkbox a:active {color: #0000FF} /* selected link สีน้ำเงิน * /
< /style>
</head>
<body>
<div class="linkbox">
< a href="http://www.google.com">ไป google</a>
< a href="http://www.facebook.com">ไป facebook</a>
< a href="file1.php">ไป 1</a>
< a href="file2.php">ไป 2</a>
< a href="file3..php">ไป 3</a>
< /div>
<body>
</html>
ตัวอย่าง
ไม่มีความคิดเห็น:
แสดงความคิดเห็น