0

我有以下 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">
                <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;
}
4

3 回答 3

1

只需删除该$(".tip").show();行,它隐含在FadeIn()方法中。

这是一个工作示例(IE8)

http://jsfiddle.net/Cxvdk/1/

于 2010-05-20T03:45:24.457 回答
0

Ben,
我知道这$(".tip").show();是隐含的和不必要的,但我想告诉你,.show有效,而.fadeIn无效。我更新了您的 jsFiddle 代码http://jsfiddle.net/Cxvdk/4/。请检查一下。我添加了一个导致问题的外部 DIV。

??

于 2010-05-21T04:29:12.703 回答
0

从css中删除它,它将起作用:

.section { 显示:块;}

于 2011-04-05T02:06:07.200 回答