本文实例讲述了jQuery实现行文字链接提示效果的方法。分享给大家供大家参考。具体实现方法如下:
代码如下:
一行文字的提示效果
script>
$(function(){
$(".div ul li").hover(function(e){
var x=e.pageX;
var y=e.pageY;
var div=$("");
var text=$(this).html();
$(this).append(div);
$("#div_show").html(text).css({"height":"25px","position":"absolute","zIndex":"99","backgroundColor":"#38F758","whiteSpace":"nowrap","paddingLeft":"15px","paddingRight":"15px","top":y+10+"px","left":x+10+"px"});
$("this").children("#div_show").show();
},function(){
$(this).children("#div_show").remove();
})
})
script>
好吧,现在流行HTML5,我就给它标题加上个HTML5吧
Raphael js库是在webrebuild交流会上听到的
我们来简单了解一下上文中提到的css appearance
希望本文所述对大家的jQuery程序设计有所帮助。