<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>A标签</title>
<style type="text/css">
*{ margin:0; padding:0;}
a{ color:#00C; text-decoration:none; padding:0 20px;}/*整个页面A标签的属性*/
a:hover{ color:#F00; text-decoration:underline}/*整个页面A标签鼠标滑过属性*/
.one,.two{ width:800px; margin:20px auto; line-height:36px; border:1px solid green;}
.two a{ color:#000;}/*在.two这个div里面A标签的属性*/
.two a:hover{ color:#0F0;}
</style>
</head>
<body>
<div class="one"><a href="#">百度</a><a href="#">新浪</a><a href="#">腾讯</a><a href="#">网易</a></div>
<div class="two"><a href="#">百度</a><a href="#">新浪</a><a href="#">腾讯</a><a href="#">网易</a></div>
</body>
</html>