我正在使用带有 3 个选项卡的 jquery 图像滑块,其中包含文本信息,在每个选项卡中我都给出了不同的背景图像,我希望它们在选项卡具有悬停或活动效果时更改为其他图像,它在所有浏览器中运行良好,除了IE(我在 IE7、8、9 中测试过)。在 IE 中,当任何选项卡变为活动状态时,其背景图像将变为 tab3(最后一个选项卡)的活动背景图像。如果您需要更多信息,请告诉我。以下是我的 html 代码及其 css:
<div id="featured_slide">
<div id="featured_wrap">
<ul id="featured_tabs">
<li class="tb1"><a href="#fc1">A<br />
<span>test message1.</span></a></li>
<li class="tb2"><a href="#fc2">B<br />
<span>test message2.</span></a></li>
<li class="tb3"><a href="#fc3">C<br />
<span>test message3</span></a></li>
</ul>
<div id="featured_content">
<div class="featured_box" id="fc1"><img src="images/Main1.png" alt="" />
</div>
<div class="featured_box" id="fc2"><img src="images/Main2.png" alt="" />
</div>
<div class="featured_box" id="fc3"><img src="images/Main3.png" alt="" />
</div>
</div>
</div>
<style>
#featured_slide ul#featured_tabs li.last
{
border-bottom:none;
}
#featured_slide ul#featured_tabs li.tb1
{
background:url("../images/Slider1.png") top right no-repeat transparent;
}
#featured_slide ul#featured_tabs li.tb2
{
background:url("../images/Slider2.png") top right no-repeat transparent;
}
#featured_slide ul#featured_tabs li.tb3
{
background:url("../images/Slider3.png") top right no-repeat transparent;
}
#featured_slide ul#featured_tabs li.tb1 a:hover
{
background:url("../images/Slider1Active.png") top right no-repeat transparent;
}
#featured_slide ul#featured_tabs li.tb2 a:hover
{
background:url("../images/Slider2Active.png") top right no-repeat transparent;
}
#featured_slide ul#featured_tabs li.tb3 a:hover
{
background:url("../images/Slider3Active.png") top right no-repeat transparent;
}
#featured_slide ul#featured_tabs li.tb1.ui-tabs-selected a
{
background:url("../images/Slider1Active.png") top right no-repeat transparent;
}
#featured_slide ul#featured_tabs li.tb2.ui-tabs-selected a
{
background:url("../images/Slider2Active.png") top right no-repeat transparent;
}
#featured_slide ul#featured_tabs li.tb3.ui-tabs-selected a
{
background:url("../images/Slider3Active.png") top right no-repeat transparent;
}
</style>