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>
运行代码
查看全文
相关阅读:
json学习系列(1)-使用json所要用到的jar包下载
Java 时间架构图
时间纪元与时区介绍
HTML5 Canvas 绘制库存变化折线
HTML5 Canvas 笛卡尔坐标系转换尝试
像孩童一样欣喜的看着自己的成长
《老炮儿》结尾貌似历史上的一幕
很多人还在守着金饭碗要饭
还是用文本编辑器编程让人愉悦
Node.js 网页爬虫再进阶,cheerio助力
原文地址:https://www.cnblogs.com/jikey/p/1745044.html
最新文章
[BI项目记]-DB脚本同步
超级立方体小记
File attachment or query results size exceeds allowable value of 1000000 bytes.
linux下创建带password的用户
cocos2d_x_01_环境搭建
工厂方法模式
泛泰 A850 4.1.2 刷第三方专用Recovery合集
蓝的成长记——追逐DBA(18):小机上WAS集群故障,由一次更换IP引起
bzoj1497【NOI2006】最大获利
数据结构之---C语言实现拓扑排序AOV图
热门文章
在AutoLyout中动态获得cell的高度 和 autoLyout中的小随笔
Dynamics CRM2013 业务规则的新建、激活与删除
Spring的控制反转(IOC)和依赖注入(DI)具体解释
json学习系列(8)JSON与JAVA数据的相互转换实例
json学习系列(7)JSONBuilder的用法
json学习系列(6)JSONObject和JSONArray是JDK的集合部分延伸
json学习系列(5)-json错误解析net.sf.ezmorph.bean.MorphDynaBean cannot be cast to
json学习系列(4)-JSONString对象的optXXX方法的使用
json学习系列(3)-JSONObject的过滤设置
json学习系列(2)-生成JSONObject的方法
Copyright © 2011-2022 走看看