jquery 实现 提示框的 滑入 滑出效果
来源:互联网 发布:php 代码压缩 编辑:程序博客网 时间:2024/06/04 20:31
感谢作者。http://www.jquery001.com/jquery-overlay-with-slide-out-box.html
效果图:
小关闭按钮图片:
代码:
<%@ Page Language="C#"AutoEventWireup="true"CodeBehind="WebForm3.aspx.cs"Inherits="webShiYan2.WebForm3" %>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/>
<metaname="keywords"content=" "/>
<metaname="description"content=" "/>
<title></title>
<scriptsrc="jquery-1.7.js"type="text/javascript"></script>
<styletype="text/css">
.overlay {
background-color:gray;
filter: alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity:0.5;
opacity: 0.5;
position: fixed;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
z-index: 100;
}
.box {
position: fixed;
top: -500px;
left: 30%;
right: 30%;
background-color:#fff;
color: #7F7F7F;
padding: 20px;
border: 2px solid #ccc;
-moz-border-radius:20px;
-webkit-border-radius:20px;
-khtml-border-radius:20px;
-moz-box-shadow:01px5px #333;
-webkit-box-shadow:01px5px #333;
z-index: 101;
}
a.boxclose {
float: right;
width: 26px;
height: 26px;
background: transparent url(cancel.png)repeattopleft;
margin-top: -30px;
margin-right:-30px;
cursor: pointer;
}
.img {
float: right;
}
</style>
<scripttype="text/javascript">
$(document).ready(function () {
$(function () {
$('#activator').click(function () {
$('#overlay').fadeIn('500',function () {
$('#box').animate({'top':'150px' }, 500);
});
});
$('#boxclose').click(function () {
$('#box').animate({'top':'-500px' }, 500,function () {
$('#overlay').fadeOut('500');
});
});
});
});
</script>
</head>
<body>
<aid="activator"href="#"class="demobuttonlightblue">点击查看效果</a>
<divclass="overlay"id="overlay"style="display:none;"></div>
<divclass="box"id="box">
<aclass="boxclose"id="boxclose"></a>
<h2>让我们继续努力,Let's Work Hard!</h2>
<imgclass="img"src="funny.jpg"alt="MOX"/>
<p>
这里显示我们给要提示用户的重要消息,可关闭消息框。
做程序员很累,大家注意休息,看看右边的图,^_^。大家继续加油吧,不然就成这个样子了,.NET是很有前途的。
</p>
</div>
</body>
</html>
- jquery 实现 提示框的 滑入 滑出效果
- jQuery 动画效果,消失,显现,渐出,渐入
- jquery实现隐藏的div出现时滑动效果
- unity 脚本实现UI滑出效果
- jquery插件滑块效果的实现
- Jquery 插件 qtip 实现丰富的提示效果
- 【转】jQuery实现的简单文字提示效果模拟title
- JQuery实现超链接鼠标提示效果的方法
- 漂亮的jquery提示效果
- 一款jQuery打造的滚动条在底部滑出信息提示层
- AJAX与Jquery实现类似Google Suggest的提示框效果
- Jquery实现右侧滑出特效
- Activity左边滑出,右边滑入的动画切换
- Activity左边滑出,右边滑入的动画切换
- JS实现DIV提示框的效果
- JS实现DIV提示框的效果
- CSS实现提示框的效果
- 实现页面从右往左侧滑入效果
- jQuery获取Select选择的Text和 Value(转)
- Android之SurfaceView简介(一)
- Codeforces Round #163 (Div. 2) E. More Queries to Array...
- UserAgent:通过浏览器获取用户浏览器和电脑信息
- google protocol buffer 与 redis 结合使用
- jquery 实现 提示框的 滑入 滑出效果
- jQueryValidationEngine_JS验证框架(上)
- UML 第二章
- 基于InnoDB存储引擎的mysql数据库表结构详解
- 有爱好者把我的CMS管理系统改成了JAVA版,有兴趣的可以看看
- CHttpConnection
- Tomcat性能调优方案
- 开发自已的javascript,收藏夹工具栏
- comboBox执行回车键变Tab键