在我的博客好家伙我使用这个脚本:的Javascript工具提示在IE无法正常工作
jQuery(document).ready(function() {
jQuery(".postbox").hover(function() {
tipinfo = $(this).find('.tipinfo');
var t = jQuery(this).position() + jQuery(this).width();
var leftto = t.left + jQuery(this).width() - 30;
tipinfo.css({
top: jQuery(this).position().top + jQuery(this).height() - 2,
left: leftto
});
tipinfo.show(); //vedi tooltip
}, function() {
tipinfo.hide(); //nascondi tooltip
})
});
工具提示完美的作品与IE以外所有浏览器。我知道国家将浏览器从微软悬停是行不通的,所以我请求你的帮助。有补救措施的问题?
我将是你的帮助,非常感谢
的CSS:
.tipinfo {
border-radius: 3px 3px 3px 3px;
color: #FFFFFF;
display: none;
position: absolute;
width: 350px;
z-index: 1000;
}
.bgbull {
background: url(images/bgbulle.png) no-repeat scroll 0 0 transparent;
height: 29px;
line-height: 35px;
padding-left: 50px;
width: 308px;
}
.infob {
background: none repeat scroll 0 0 #151515;
border-bottom: 1px solid #151515;
border-left: 1px solid #151515;
border-right: 1px solid #151515;
line-height:1.2em;
padding: 5px
;width: 296px;
}
.bgbullbottom {
background: url(images/bgbullebottom.png) no-repeat scroll 0 0 transparent;
height: 29px;
line-height: 35px;
padding-left: 50px;
width: 308px;
}
HTML代码:
<div class="tipinfo" style="display:none;">
<div class="bgbull"></div>
<div class="infob">
<h4 style="color:#494949;font-family:arial,sans-serif;font-size:12px;font-weight:bold;"><?php the_title_attribute(); ?></h4>
<br>
<span style="color:#bbb;"><?php the_excerpt(); ?></span>
<br>
<div style="margin-top:2px;border-top:1px dotted #323232;"></div><br>
<div style="color:#bbb;">
<span class="info">Genere: </span><br />
<span class="info">Durata: </span><br />
<span class="info">Non sai se ti piace? </span>
</div>
<div class="clear"></div>
</div>
<div class="bgbullbottom"></div>
</div>
你有GI ven'mouseenter'和'mouseleave'有什么作用? – 2011-06-09 19:10:03
对不起,我的英文不好....你能解释一下吗? – Fask 2011-06-09 19:12:04
http://api.jquery.com/mouseenter/和http://api.jquery.com/mouseleave/,但基本上没有监听mouseenter和mouseleave的监听 – 2011-06-09 19:15:32