1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > jQuery实现信息提示框(带有圆角框与动画)效果【jquery】

jQuery实现信息提示框(带有圆角框与动画)效果【jquery】

时间:2019-11-21 13:09:09

相关推荐

jQuery实现信息提示框(带有圆角框与动画)效果【jquery】

web前端|js教程

jQuery,信息,提示框

web前端-js教程

本文实例讲述了jQuery实现信息提示框效果。分享给大家供大家参考。具体如下:

后盾网thinkphp许愿墙源码,vscode配置打开网页,ubuntu环境崩了,tomcat压测要求,小说更新爬虫,简单的php项目,seo优化从零开始运营,大气的网站源码,ecshop 团购模板lzw

一个jquery提示框特效,黑色风可,且提示框是圆角形状,点击页面中间的几个文字,提示框信息就会动态显示,CSS和JS部分代码比较多。

防封php源码,安装ubuntu卡grup,pycharm爬虫指定抓取,遍历php,seo黑色收入lzw

先来看看运行效果如下:

网博士成品网站源码,idea设置vscode主题,ubuntu 天气插件,tomcat服务启动卡住,sqlite文件打开方式,大数据工程师和爬虫的区别,php数据库实现,知乎问答如何seo,vb源码网站,学校微信公众号模板下载安装lzw

具体代码如下:

jQuery实现的非常人性化的提示信息框效果var humanMsg = { setup: function(appendTo, logName, msgOpacity) { humanMsg.msgID = humanMsg; humanMsg.logID = humanMsgLog; if (appendTo == undefined) appendTo = ody; if (logName == undefined) logName = Message Log; humanMsg.msgOpacity = .8; if (msgOpacity != undefined) humanMsg.msgOpacity = parseFloat(msgOpacity); jQuery(appendTo).append(

+logName+

) jQuery(#+humanMsg.logID+ p).click( function() { jQuery(this).siblings(ul).slideToggle() } ) }, displayMsg: function(msg) { if (msg == \) return; clearTimeout(humanMsg.t2); jQuery(#+humanMsg.msgID+ p).html(msg) jQuery(#+humanMsg.msgID+\).show().animate({ opacity: humanMsg.msgOpacity}, 200, function() { jQuery(#+humanMsg.logID) .show().children(ul).prepend(\+msg+\) .children(li:first).slideDown(200) if ( jQuery(#+humanMsg.logID+ ul).css(display) == one) { jQuery(#+humanMsg.logID+ p).animate({ bottom: 40 }, 200, linear, function() { jQuery(this).animate({ bottom: 0 }, 300, easeOutBounce, function() { jQuery(this).css({ bottom: 0 }) }) }) } }) humanMsg.t1 = setTimeout("humanMsg.bindEvents()", 700) humanMsg.t2 = setTimeout("humanMsg.removeMsg()", 5000) }, bindEvents: function() { jQuery(window) .mousemove(humanMsg.removeMsg) .click(humanMsg.removeMsg) .keypress(humanMsg.removeMsg) }, removeMsg: function() { // Unbind mouse & keyboard jQuery(window) .unbind(mousemove, humanMsg.removeMsg) .unbind(click, humanMsg.removeMsg) .unbind(keypress, humanMsg.removeMsg) if (jQuery(#+humanMsg.msgID).css(opacity) == humanMsg.msgOpacity) jQuery(#+humanMsg.msgID).animate({ opacity: 0 }, 500, function() { jQuery(this).hide() }) }};jQuery(document).ready(function(){ humanMsg.setup();})html, body { height: 100%; /* Damn you IE! */}.humanMsg { font: normal 20px/50px Helvetica, Arial, Sans-Serif; letter-spacing: -1px; position: fixed; top: 130px; left: 25%; width: 50%; color: white; background-color: black; text-align: center; display: none; opacity: 0; z-index: 100000;}.humanMsg .round { border-left: solid 2px white; border-right: solid 2px white; font-size: 1px; height: 2px; }.humanMsg p { padding: .3em; display: inline; }.humanMsg a { display: none; }#humanMsgLog { font: normal 10px Helvetica, Arial, Sans-Serif; color: white; position: fixed; bottom: 0; left: 0; width: 100%; max-height: 200px; display: none; z-index: 10000; }#humanMsgLog p { position: relative; left: 50%; width: 200px; margin: 0; margin-left: -100px; padding: 0 10px; line-height: 20px; background: #333; text-align: center; white-space: pre; cursor: pointer; }#humanMsgLog p:hover { background: #222; }#humanMsgLog ul { margin: 0; padding: 0; position: relative; max-height: 180px; overflow: auto; display: none; }#humanMsgLog ul li { color: #555; font-size: 12px; list-style-type: none; border-bottom: 1px solid #ddd; line-height: 40px; display: none; padding: 0 20px; position: relative; overflow: hidden; white-space: pre; }#humanMsgLog ul li:hover { background: #f2f2f2; }#humanMsgLog ul li:first-child { margin-top: 1px; }#humanMsgLog ul li .error { color: orangered; }#humanMsgLog ul li .indent { position: absolute; top: 0; left: 100px; margin-right: 200px; height: inherit;} jQuery(document).ready(function() { jQuery(a.showmessage).click(function() { humanMsg.displayMsg(Success: You clicked \\+jQuery(this).text()+\\); return false; }) jQuery(a.showmessage:last).click(function() { humanMsg.displayMsg(\"Your Earth will be reduced to a burned-out cinder."); return false; }) }) p.links { position: absolute; font: 2em Helvetica, Arial, Sans-Serif; top: 40%; left: 50%; width: 400px; margin-left: -200px; text-align: center; } p.links a { text-decoration: none; color: #888; } p.links a:hover { color: #222; } p.links a.home { font-size: 10px; line-height: 30px; }

Klaatu Barada Nikto

Humanized Messages

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。