css精灵活动状态仍显示在浏览器的“后退”按钮上

css精灵活动状态仍显示在浏览器的“后退”按钮上,css,css-sprites,Css,Css Sprites,我正在尝试使用CSS精灵作为导航栏。经过大量的互联网研究,我想我已经确定了“最简单”的方法。除了单击浏览器的“上一步”按钮外,所有功能都正常工作。在IE(8.0.6001.18701)中,激活状态为“卡住”(看起来按钮被按下)。在Firefox(14.0.1)中,悬停状态为“卡住”。我可以接受Firefox的问题,因为一旦鼠标从后退按钮上移开,它就会消失,但IE的问题就不会了。目前,我在头文件中使用了navbar,它与Includes一起使用,以保持内容的简单性和一致性。 下面是html模板。我

我正在尝试使用CSS精灵作为导航栏。经过大量的互联网研究,我想我已经确定了“最简单”的方法。除了单击浏览器的“上一步”按钮外,所有功能都正常工作。在IE(8.0.6001.18701)中,激活状态为“卡住”(看起来按钮被按下)。在Firefox(14.0.1)中,悬停状态为“卡住”。我可以接受Firefox的问题,因为一旦鼠标从后退按钮上移开,它就会消失,但IE的问题就不会了。目前,我在头文件中使用了navbar,它与Includes一起使用,以保持内容的简单性和一致性。 下面是html模板。我所有的页面都使用这个。(当我通过这个问题时,我将进入其他身体)


Sprites:(抱歉,不允许新用户发布图像)

使用
:link
:visted
伪类设置所有常见的默认状态,然后再使用以下命令定义单个
:hover
:active
状态:


请注意,不正确的分号“;“在一些背景位置被更正为冒号后”:”,但没有解决问题。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="stylesheet" type="text/css" href="DS.css">
</head>
<body>
<div id="centerpage">
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
<tr>
<td>
<!--webbot bot="Include" U-Include="Nav_Includes/Header.htm" TAG="BODY" --></td>
</tr>
<tr>
<td>Enter page data here.<br>
<hr width="770" size="1">
<span id="timestamp">Page last updated: 
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%m/%d/%Y %I:%M %p" --></span></td>
</tr>
<tr>
<td>
<!--webbot bot="Include" U-Include="Nav_Includes/Footer.htm" TAG="BODY" --></td>
</tr>
</table>
</div>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Dolphin Storage Header</title>
<link rel="stylesheet" type="text/css" href="../DS.css">
</head>
<body>
<img border="0" src="../images/header.jpg" width="760" height="101" align="center">
<p><a class="navHome" href="../index.htm"></a>
<a class="navUnits" href="../units.htm"></a>
<a class="navSpecials" href="../specials.htm"></a>
<a class="navAbout" href="../about.htm"></a>
<a class="navContact" href="../contact.htm"></a></p>
</body>
</html>
body {
font-family: Arial, Helvetica, Sans-serif;
color: #000000;
text-align:center; /* Fix for IE not centering webpage */
background-color: #ffe670;
}
#centerpage {
width: 770px; 
margin: 0 auto;   /* Top & Bottom = 0, Right & Left = auto to center the page horizontally */
text-align:left;  /* 2nd part of IE fix for centering webpage */
}
/* Navagation bar, using 'sprite' images */ 
a.navHome {
display: block;
float: left;
width: 160px;
height: 30px;
background-image: url('Nav_Buttons/Home.jpg');
background-repeat: no-repeat;
background-position; 0 0;
}
a.navHome:hover {
background-position: 0 -30px;
}
a.navHome:active {
background-position: 0 -60px;
}

a.navUnits {
display: block;
float: left;
width: 150px;
height: 30px;
background-image: url('Nav_Buttons/Units.jpg');
background-repeat: no-repeat;
background-position; 0 0;
}
a.navUnits:hover {
background-position: 0 -30px;
}
a.navUnits:active {
background-position: 0 -60px;
}

a.navSpecials {
display: block;
float: left;
width: 150px;
height: 30px;
background-image: url('Nav_Buttons/Specials.jpg');
background-repeat: no-repeat;
background-position; 0 0;
}
a.navSpecials:hover {
background-position: 0 -30px;
}
a.navSpecials:active {
background-position: 0 -60px;
}

a.navAbout {
display: block;
float: left;
width: 150px;
height: 30px;
background-image: url('Nav_Buttons/About.jpg');
background-repeat: no-repeat;
background-position; 0 0;
}
a.navAbout:hover {
background-position: 0 -30px;
}
a.navAbout:active {
background-position: 0 -60px;
}

a.navContact {
display: block;
float: left;
width: 160px;
height: 30px;
background-image: url('Nav_Buttons/Contact.jpg');
background-repeat: no-repeat;
background-position; 0 0;
}
a.navContact:hover {
background-position: 0 -30px;
}
a.navContact:active {
background-position: 0 -60px;
}

#timestamp {
font-family: Arial, Helvetica, Sans-serif;
color: #000000;
font-size: xx-small;
}

H5 {
font-family: Georgia, "Times New Roman", Times, serif;
color: #035f8e;
}
a.navUnits:link, a.navUnits:visited, a.navSpecials:link, a.navSpecials:visited, a.navAbout:link, a.navAbout:active, a.navContact:link, a.navContact:visited, a.navHome:link, a.navHome:visited { background-position: 0 0; }