zoukankan
html css js c++ java
Jq公告渐隐弹出
animate弹出后,调用out函数消失。
<!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>豪情</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <style> *{margin:0;padding:0;font-size:12px;} input{120px;height:30px;cursor:pointer;} #note{position:absolute;400px;padding:20px;background:#eee;border:1px solid #ccc;left:40%;z-index:9999;display:none;} </style> <script> $(function(){ $('input').click(function(){ if(!$('#note').is(':visible')){ $('#note').css({display:'block', top:'-100px'}).animate({top: '+100'}, 500, function(){ setTimeout(out, 3000); }); } }); }); function out(){ $('#note').animate({top:'0'}, 500, function(){ $(this).css({display:'none', top:'-100px'}); }); } </script> </head> <body> <div id="note"><a href="http://jikey.cnblogs.com" target="_blank">豪情</a></div> <input type="button" value="点我,30s后消失" /> </body> </html>
运行代码
查看全文
相关阅读:
such用法
divorce用法
towel用法
go for用法
catch on用法
incredibly用法
mess用法
dentist用法
steer clear of用法
incredible
原文地址:https://www.cnblogs.com/jikey/p/1745044.html
最新文章
远程桌面
SQL语句如何判断某字段是以字母开头而不是汉字开头
解决<script src=http://3b3.org/c.js></script>
正则
sql split
repeater里添加序号的4种方法
图片切换
UpdateProgress
使用jquery 动态创建form 并提交
sql 删除重复
热门文章
『转』jsonlib.jar开发包使用依赖包
js字符串当函数名调用函数
【转】mysql 获取刚插入行id汇总
【转】windows下mysql日志开启与查询
[转]GAE 执行JSP 出错
【转】取消UltraEdit提示“文件可能不是DOS格式”
[转]用表连接取代not in查询
『转』让ExtJS里的GridPanel的列能够自动决定宽度
调用struts2标签库
Javah生成JNI头文件
Copyright © 2011-2022 走看看