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>
运行代码
查看全文
相关阅读:
运算符,可变不可变数据类型
基本的数据类型
Python_day1
day2_操作系统
git fetch 命令
Git branch 命令
tmux常用命令
转载-struts中logic标签使用
转载-SVN常用命令
javascript判断图片加载完成的三种方法
原文地址:https://www.cnblogs.com/jikey/p/1745044.html
最新文章
Linux下的crontab定时执行任务命令详解
python搭建本地服务器
pycharm基础使用方法
实现点赞动态效果
Android 界面滑动卡顿分析与解决方案(入门)
GIT界的神探--bisect
基于Web和二维码的文件传输服务
[cocos2dx] cocosdx编译工程那些事
Android Download机制详解(一)DocumentUI部分
java倒序输出List
热门文章
Android搜索控件的基本使用方法
某种带权有向无环图(graph)的所有路径的求法
wireshark 1.10.0 编译 及 协议解析部分的一些变化
使用unordered_map提升查找效率
Nginx与PHP(FastCGI)的安装、配置
CGI-FASTCGI-PHPFPM
php调用mysql存储过程游标
php调用mysql存储过程
初识函数
字符编码和文件处理
Copyright © 2011-2022 走看看