【发布时间】:2012-11-07 05:46:41
【问题描述】:
我似乎无法让我的精灵在 IE 7 及更低版本中正常工作。 (IE 9 工作正常) 下面是我的 CSS:
#info
{
width:100%;
height:77px;
background:url('../img/ck_sprite.png')no-repeat;
background-position: 0px 0px;
float:left;
display:block;
clear:both;
}
#info:hover
{
width:100%;
background:url('../img/ck_sprite.png')no-repeat;
background-position: 0px -300px;
cursor: default;
float:left;
}
还有两个这样的类
我已尝试搜索该问题的解决方案,但解决方案不适用于我的问题。
编辑:对不起,我没有描述我的实际问题。图像在 IE 中根本不显示。
这是我的html代码:
<div id="info">
</div>
<asp:Literal ID="litInfo" runat="server" />
<div id="bestilling">
</div>
<asp:Literal ID="litBestilling" runat="server" />
<div id="kontakt">
<asp:Literal ID="litKontakt" runat="server" />
如您所见,我用 C# 对网站进行了编码。文字放置在 div 之外,因为它们应该包含的唯一内容是图像。 (它们是头条新闻)
【问题讨论】:
-
请向我们展示你的现场演示,这会更好......
-
实际问题是什么。精灵不显示?显示在错误的位置?您应该在右括号和“不重复”声明之间留一个空格。
-
啊老'不工作'错误..
-
有什么问题?为什么你给我们展示了两种风格?正常 r 悬停状态是否发生错误?
标签: html css internet-explorer png sprite