jQuery实现鼠标悬停显示提示信息窗口的方法
更新时间:2015年04月30日 09:39:29 作者:休闲生活文化
这篇文章主要介绍了jQuery实现鼠标悬停显示提示信息窗口的方法,涉及jQuery操作鼠标事件及show、hide等方法的使用技巧,需要的朋友可以参考下
本文实例讲述了jQuery实现鼠标悬停显示提示信息窗口的方法。分享给大家供大家参考。具体实现方法如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>鼠标悬停显示提示信息窗口</title> <meta http-equiv="content-type" content="text/html;charset=gb2312"> <style type="text/css"> .contact{width:100px;height:15px; margin:20px 0 0 50px;background-color:#CCCCCC; text-align:center; } .us{display:none;width:300px;height:40px; padding:10px;position:relative;top:0px;left:50px; background-color:#0099FF; } </style> <script src="jquery-1.6.2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".contact").mouseover(function(){ $(".us").show("slow"); $(".contact").mouseout(function(){ $(".us").hide("slow"); }); }); }) </script> </head> <body> <div class="contact">联系我们</div> <div class="us">提示内容!提示内容!提示内容!</div> <div>https://www.jb51.net/</div> </body> </html>
希望本文所述对大家的jQuery程序设计有所帮助。
相关文章
关于query Javascript CSS Selector engine
本篇文章,小编将为大家介绍,关于query Javascript CSS Selector engine,有需要的朋友可以参考一下2013-04-04Spring shiro + bootstrap + jquery.validate 实现登录、注册功能
这篇文章主要介绍了Spring shiro + bootstrap + jquery.validate 实现登录、注册功能,需要的朋友可以参考下2017-06-06jQuery实现获取form表单内容及绑定数据到form表单操作分析
这篇文章主要介绍了jQuery实现获取form表单内容及绑定数据到form表单操作,结合jQuery封装插件操作分析了jQuery针对form表单的serializeJson数据获取及setForm数据绑定相关操作技巧,需要的朋友可以参考下2018-07-07
最新评论