当我将链接添加到图像(href)时,菜单样式会影响我的图像,请注意影响 google 图像的紫色。
<!DOCTYPE html>
<html>
<head>
<style>
ul
{ float:left; width:100%; padding:0; margin:0; list-style-type:none;}
a { float:left; width:6em; text-decoration:none; color:white; background-color:purple;
padding:0.2em 0.6em; border-right:1px solid white; }
a:hover
{background-color:#ff3300;}
li {display:inline;}
</style>
</head>
<body>
<ul>
<li><a href="#">Link one</a></li>
<li><a href="#">Link two</a></li>
<li><a href="#">Link three</a></li>
<li><a href="#">Link four</a></li>
</ul>
<p>
body text
</p>
<a href="test.php" target="_blank"><img src="http://www.google.se/images/google_80wht.gif"
</body>
</html>