JQuery 遮罩层弹窗
var str = "<div id=\"zhezhao\" style=\"display:none; background-color: rgba(0,0,0,0.3); width: 100%; height: 100%; position: fixed; top: 0px; left: 0px; z-index: 9999;\">";
str += "<div id=\"tanchuang\" style=\"width: 300px; margin: auto; top:-500px; position: relative; background-color: white; box-shadow: 0px 0px 10px black; border-radius: 5px; font-family: 微软雅黑;\">";
str += "<div id=\"tc-title\" style=\"width: 100%; height: 40px; position: relative; text-indent: 15px; line-height: 40px; background-color: #808080;\"></div>";
str += "<div id=\"tc-context\" style=\"width: 100%; height: 30px; position: relative; margin-top: 20px; text-align: center; line-height: 30px; font-size: 1.3em;\"></div>";
str += "<div id=\"tc-btns\" style=\"width: 100%; height: 30px; position: relative; margin-top: 20px;\">";
str += "<div id=\"tc-btn1\" style=\"width: 80px; height: 30px; position: relative; left: 110px; background-color: red; text-align: center; line-height: 30px; color: white; font-size: 1.2em; border-radius: 5px;cursor:pointer;\">确 定</div>";
str += "</div><div style=\"width: 100%; height: 30px; position: relative;\"></div></div></div>";
document.getElementsByTagName("body")[].innerHTML += str; function SelfAlert(t, c) {
$("#tc-title").text(t);
$("#tc-context").text(c);
$("#zhezhao").css("display", "block");
$("#tanchuang").animate({ top: "200px" }, ).animate({ top: "150px" }, ).animate({ top: "200px" }, );
} $("#tc-btn1").live("click", function () {
$("#tanchuang").animate({ top: "250px" }, ).animate({ top: "-500px" }, , function () {
$("#zhezhao").css("display", "none");
});
}); $("#tc-btn1").live("mouseover", function () {
$(this).animate({ backgroundColor: "#890606" }, );
});
$("#tc-btn1").live("mouseout", function () {
$(this).animate({ backgroundColor: "red" }, );
});
JS代码
JQuery 遮罩层弹窗的更多相关文章
- div 遮罩层 弹窗
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- jQuery遮罩层的实现
遮罩层其实就是一个占据整个页面的半透明效果的页面元素,一般用div实现.页面中实现遮罩层,无非就是为了让用户只能操作弹出窗口的内容,而不允许操作弹出窗口外的内容. 在实现时,我使用了两个div,一个遮 ...
- jQuery遮罩层登录对话框
用户登录是许多网站必备的功能.有一种方式就是不管在网站的哪个页面,点击登录按钮就会弹出一个遮罩层,显示用户登录的对话框.这用方式比较灵活方便.而现在扫描二维码登录的方式也是很常见,例如QQ.微信.百度 ...
- jQuery遮罩层插件
在网页上常常遇到须要等待非常久的操作,比方导出报表等.为了预防用户点击其它操作或者多次点击同个功能,须要用遮罩层把页面或者操作区盖住.防止用户进行下一步操作.同一时候能够提高界面友好度,让用户知道操作 ...
- jquery 遮罩层显示img
如果点击iframe中的image显示整个页面的遮罩层,可参考如下: http://blog.csdn.net/shiaijuan1/article/details/70160714 具体思路就是,顶 ...
- jquery遮罩层
(function () { //遮罩层实现 zhe zhao ceng kexb 2016.2.24 $.extend($.fn, { mask: function (msg, maskDivCla ...
- jQuery带遮罩层弹窗实现(附源码)
1.CSS样式 <style type="text/css"> body { font:11px/1.6em Microsoft Yahei; background:# ...
- jQuery遮罩层效果
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- jquery 遮罩层指定位置
.css .datagrid-mask-msg { position: absolute; top: %; margin-top: -20px; padding: 12px 5px 10px 30px ...
随机推荐
- android适配各种分辨率的问题
Android设备屏幕的尺寸是各式各样的,如小米是4英寸的,Xoom平板是10英寸:分辨率也千奇百怪,800×480,960×540等:Android版本的碎片化问题更是萦绕于心,不过在设计应用时可以 ...
- 笔试题目练习-python
以下内容包含笔试练习库的题目和代码,题目来自牛客网,仅供参考. # coding = utf-8 import sys def test1(): """ 题目描述:计算字 ...
- [Java学习] JSON工具学习记录--FastJSON
最近做项目,总是与json打交道,在用了即可json工具后,个人认为fastJson最好用,很方便,API也清晰可见,所以记录下使用方法,给需要的人提供帮助.(部分摘抄自网络) 一.API入口 Fas ...
- 『TensorFlow』通过代码理解gan网络_中
『cs231n』通过代码理解gan网络&tensorflow共享变量机制_上 上篇是一个尝试生成minist手写体数据的简单GAN网络,之前有介绍过,图片维度是28*28*1,生成器的上采样使 ...
- bzoj1833: [ZJOI2010]count 数字计数 数位dp
bzoj1833 Description 给定两个正整数a和b,求在[a,b]中的所有整数中,每个数码(digit)各出现了多少次. Input 输入文件中仅包含一行两个整数a.b,含义如上所述. O ...
- 关于floyd 打印路径的问题
我们令 f[i][j] 表示从 i-->j的最短路上j前面的那个点. 显然初始化时 f[i][j]=i; (这样的话先判断一下i是否能到达j好点) 更新条件时,当发现通过点k能使最短 ...
- Linux文件与目录管理(二)
一.处理目录的常用命令 ls:列出目录 cd:切换目录 pwd:显示当前的目录 mkdir:创建一个新的目录 rmdir:删除一个空的目录 cp:复制文件或者目录 rm:移除文件或者目录 可以使用ma ...
- quartz---触发job时间和结束时间
quartz:Trigger:触发job时间和结束时间 package com.imooc.demo.helloQuartz; import java.text.SimpleDateFormat; i ...
- Spring Cloud Edgware之后版本 Zipkin+Kafka整合
zipkin服务器端 1.依赖 <!-- zipkin server --> <dependency> <groupId>io.zipkin.java</gr ...
- C++:线程(std::thread)
1.创建一个线程 创建线程比较简单,使用std的thread实例化一个线程对象就创建完成了,示例: #include <iostream> #include <thread> ...