jquery
2011-11-18 76 views 1 likes 
1

我发了一个快example我的问题。淡入淡出徘徊边框

任何人都可以告诉我为什么当我悬停边框时,我的fadeTo支持主不透明度?

我认为它是一个边框问题,我可以打开,检查小提琴,悬停边框,你会看到发生的小闪烁。

源:

HTML:

<div id="container"> 
<div id="title"></div> 
<table width='100%' style='border-bottom: dotted 1px;'> 
    <tr> 
     <td>One</td> 
     <td class="align_center" width="50px">Two.</td> 
     <td class="align_center" width="80px">Other</td> 
     <td class="align_center" width="70px">Other 2</td> 
    </tr> 
</table> 
<div id="result" style="height: 200px;"></div> 

CSS:

#container{ 
    display: block; 
    border: solid 1px; 
    position: absolute; 
    top: 130px; 
    left: 3px; 
    width: 500px; 
    background-color: #ccc; 
    opacity: 0.4; 
    filter: alpha(opacity=40); 
} 

JS:

$("#container").live("mouseover", function(){ 
    $(this).stop(true,true).fadeTo('slow', 1); 
}); 
$("#container").live("mouseout", function(){ 
    $(this).stop(true,true).fadeTo('slow', 0.4); 
}); 

谢谢。

回答

2

更改为$(this).stop().fadeTo('slow', 1);似乎为我解决它。第二个原因是导致它跳到动画的结尾(因此闪烁)。

+0

是真的,问题解决了,谢谢。 –

相关问题