jQuery fadeIn在Internet Explorer中不工作
我有以下HTML DIV,在IE中使用FadeIn不起作用:jQuery fadeIn在Internet Explorer中不工作,jquery,css,internet-explorer,fadein,Jquery,Css,Internet Explorer,Fadein,我有以下HTML DIV,在IE中使用FadeIn不起作用: $(".tip").fadeIn("slow"); /* Is not working in IE. */ $(".tip").show(); /* Works well in IE, that's weird. */ <div class="tip" style="width: 220px; display: none;"> <div class="tip-header">
$(".tip").fadeIn("slow"); /* Is not working in IE. */
$(".tip").show(); /* Works well in IE, that's weird. */
<div class="tip" style="width: 220px; display: none;">
<div class="tip-header">
<span><b>Title</b></span>
<div class="right close"><a href="javascript:void(0);">close</a> <img alt="" src="/Images/close-normal.png"/></div>
</div>
<div class="tip-content">EBody comes here.</div>
</div>
.tip
{
display: block;
z-index: 99999;
position: fixed;
background-color: #ffffff;
-moz-box-shadow: 2px 2px 10px 2px rgba(0, 0, 0, 0.6);
-webkit-box-shadow: 2px 2px 10px 2px rgba(0, 0, 0, 0.6);
border:solid 1px #82C2FA;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
}
.tip-header
{
padding: 8px;
min-height: 10px;
-moz-border-radius-topleft: 8px;
-moz-border-radius-topright: 8px;
-webkit-border-radius-topright: 8px;
-webkit-border-radius-topleft: 8px;
background-color: #CFE6FD;
border-bottom: 1px solid #82C2FA;
}
.tip-header span
{
font-size: 14px;
color: #666666;
}
.tip-content
{
padding: 8px;
text-align: left;
font-size: 12px;
}
.close, .whats-this
{
cursor: pointer;
}
.close a
{
color: #085FBC;
text-decoration: none;
}
.close img
{
vertical-align: bottom;
}
$(“.tip”).fadeIn(“慢”);/*他不在IE工作*/
$(“.tip”).show();/*在IE中运行良好,这很奇怪*/
标题
埃博迪来了。
提示
{
显示:块;
z指数:99999;
位置:固定;
背景色:#ffffff;
-moz盒阴影:2px2px10px2pxrgba(0,0,0,0.6);
-webkit盒阴影:2PX2PX10PX2PXRGBA(0,0,0,0.6);
边框:实心1px#82C2FA;
-moz边界半径:8px;
-webkit边界半径:8px;
}
.端头
{
填充:8px;
最小高度:10px;
-左上角moz边界半径:8px;
-moz边框半径右上角:8px;
-webkit边框半径右上角:8px;
-webkit边框半径左上角:8px;
背景色:#CFE6FD;
边框底部:1px实心#82C2FA;
}
.端头跨度
{
字体大小:14px;
颜色:#666666;
}
.提示内容
{
填充:8px;
文本对齐:左对齐;
字体大小:12px;
}
.关上,.这是什么
{
光标:指针;
}
.关门
{
颜色:#085FBC;
文字装饰:无;
}
.关闭img
{
垂直对齐:底部对齐;
}
只需删除$(“.tip”).show()代码>行,它隐含在FadeIn()
方法中
下面是一个工作示例(IE8)
本,
我知道,$(“.tip”).show()
是隐式的,没有必要,但是我想告诉您,.show可以工作,而.fadeIn不能。我更新了你的JSFIDLE代码。请检查一下。我添加了一个导致问题的外部DIV
?从css中删除此项,它将起作用:
.科
{
显示:块;
}什么版本的IE?您有该页面的链接吗?我可以确认jQuery文档页面上的fadeIn()
方法在IE中是否有效。我的怀疑是你CSS中的一个问题。我正在使用IE8。查看本页,我知道$(“.tip”).show();是隐式的,没有必要的,但我想告诉你,从这一点来看,show是有效的,而fadeIn是无效的。我更新了你的JSFIDLE代码。请检查一下。我添加了一个导致问题的外部DIV@Nazaf——你的例子正在IE8上工作,至少对我来说是这样。你有什么版本的IE?我有IE 8。下面是一个详细的屏幕截图。在这儿查一下,对不起。我的意思是,删除“.section{display:inline block;}”或添加“.section{display:block;}”。