仿QQ邮箱的弹出层,弹出确认框

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
<HEAD>
<TITLE>QQ邮箱的弹出层</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
body {
background: none repeat scroll 0 0 #FFFFFF;
font-family: "lucida Grande",Verdana;
font-size: 12px;
}
select, body, textarea {
font-size: 12px;
}
.tipbg {
margin: 0;
padding: 0;
background-color: transparent;
}
.qmpanel_shadow {
border-radius: 3px 3px 3px 3px;
box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
}
.bd_upload {
border: 1px solid #628D0B;
}
.bd_upload {
border: 1px solid #628D0B;
}
.fdbody {
border-left: 8px solid #FFFFFF;
border-right: 1px solid #87A34D;
}
.fdbody, .tipstitle {
background: none repeat scroll 0 0 #9BBB59;
}
.editor_dialog_title {
color: white;
font: bold 12px "lucida Grande",Verdana;
padding: 9px 0 7px 10px;
text-align: left;
}
.editor_dialog_content {
background: none repeat scroll 0 0 #FFFFFF;
filter: none;
margin: 0;
padding: 0;
text-align: center;
}
.mailinfo {
border-bottom: 2px solid #FFFFFF;
}
.mailinfo {
background: none repeat scroll 0 0 #FFFFFF;
}
.cnfx_content {
padding: 10px 0 5px 10px;
text-align: left;
}
.cnfx_status {
float: left;
padding: 0 0 0 10px;
}
.cnfx_btn {
padding: 0 10px 10px 0;
text-align: right;
}
.b_size {
font-size: 14px;
}
.editor_close {
background: none repeat scroll 0 0 #DC4835;
}
/** when mouseover,add editor_close_mover*/
.editor_close, .editor_close_mover {
border: 1px solid #A7190F;
cursor: pointer;
float: right;
margin: 7px 7px 0 0;
}
.editor_close img, .editor_close_mover img, .editor_min img, .editor_min_mover img {
display: block;
}
img {
border: medium none;
}
.wd2 {
margin: 1px 1px 0 0;
width: 64px;
}
.btn, button, .qm_btn {
padding-left: 0;
padding-right: 0;
}
input, textarea, a {
outline: medium none;
}
.editor_mask {
background: none repeat scroll 0 0 #FFFFFF;
height: 100%;
left: 0;
opacity: 0.5;
position: absolute;
top: 0;
width: 100%;
}
</style>
<script>
///////// 拖拽工具类 ////////
var DragUtil = (function(){
var doc = document;

var moveX = 0;
var moveY = 0;
var moveTop = 0;
var moveLeft = 0;
var moveable = false;
return {
/**
* 注册拖拽
* 需要传入整个窗体id和标题部分的id
*/
regist:function(winId,titleId) {
// 页面头部要加上:
// <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
// 不然会有问题的
var width = doc.documentElement.clientWidth;
var height = doc.documentElement.clientHeight;
var title = doc.getElementById(titleId);
var win = doc.getElementById(winId);
title.onmousedown = function() {
var evt = DragUtil._getEvent();

moveable = true;
moveX = evt.clientX;
moveY = evt.clientY;

moveTop = parseInt(win.style.top);
moveLeft = parseInt(win.style.left);

doc.onmousemove = function() {
if (moveable) {
var evt = DragUtil._getEvent();
var x = moveLeft + evt.clientX - moveX;

var y = moveTop + evt.clientY - moveY;
var w = parseInt(win.style.width);
var h = parseInt(win.style.height);

if ( x > 0 &&( x + w < width) && y > 0 && (y + h < height) ) {
win.style.left = x + "px";
win.style.top = y + "px";
}
}
};
doc.onmouseup = function () {
if (moveable) {
//doc.onmousemove = docMouseMoveEvent;
//doc.onmouseup = docMouseUpEvent;
moveable = false;
moveX = 0;
moveY = 0;
moveTop = 0;
moveLeft = 0;
}
};
}
}
/**
* 获取事件
*/
,_getEvent:function(){
return window.event || arguments.callee.caller.arguments[0];
}
}
})()
///////////////////////
function init(){
DragUtil.regist("WindowId","titleId")
DragUtil.regist("WindowId2","titleId2")
}
</script>
</HEAD>
<BODY >
<span id="qmdialog_container"><div
style="z-index: 1120; position: absolute; width: 447px; height: 163px; opacity: 1; left: 514px; top: 124px; margin-top: 0pt;"
class="" id="WindowId" qmanimation_play="|undefined">
<div class="tipbg">
<div style="background: #DDD;" class="opashowOuter qmpanel_shadow"
id="QMconfirm___opashow_">
<table cellspacing="0" cellpadding="0"
style="width: 447px; height: 163px;background: white;"
class="bd_upload">
<tbody>
<tr>
<td
style="height: 28px; border: none; background-image: none; cursor: move; overflow: hidden;"
class="editor_dialog_titlebar fdbody"
id="QMconfirm___title_td_"><div
id="QMconfirm___title_div_"
style="cursor: default; float: right; width: 40px; border: none; background-image: none;"
class="fdbody">
<div onmouseout="this.className=‘editor_close‘;"
onmouseover="this.className=‘editor_close_mover‘;"
class="editor_close" id="QMconfirm___closebtn2_">
<img height="12" width="12" ondragstart="return false;" src="http://www.codefans.net/jscss/demoimg/201109/ico_closetip.gif">
</div>
</div>
<div id="titleId" class="editor_dialog_title">删除确认</div>
</td>
</tr>
<tr>
<td valign="top"
style="height: 131px; border: medium none; visibility: visible;"
class="editor_dialog_content " id="QMconfirm___content_"><div
class="mailinfo"
style="border: none; height: 100%; display: inline;">
<div class="">
<div class="cnfx_content">
<img align="absmiddle"
style="float: left; margin: 5px 10px 0; display: block;"
src="http://www.codefans.net/jscss/demoimg/201109/ico_question.gif">
<table style="width: 350px; height: 80px;">
<tbody>
<tr>
<td style="vertical-align: top;"><div class="b_size"
style="padding-top: 10px; word-break: break-all; line-height: 150%;">
<div>彻底删除后邮件将无法恢复,您确定要删除吗?</div>
</div></td></tr></tbody>
</table>
</div>
<div style="display: none;" class="cnfx_status">
<input type="checkbox" id="QMconfirm__recordstatus"><label
for="QMconfirm__recordstatus"></label>
</div>
<div class="cnfx_btn">
<input type="button" value="确定" id="QMconfirm__confirm"
class="wd2 btn"><input type="button" value="取消"
style="display: ;" id="QMconfirm__cancel" class="wd2 btn"><input
type="button" value="" style="display: none;"
id="QMconfirm__never" class="wd2 btn">
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</span>
<span id="qmdialog_container"><div
style="z-index: 1120; position: absolute; width: 447px; height: 163px; opacity: 1; left: 514px; top: 324px; margin-top: 0pt;"
class="" id="WindowId2" qmanimation_play="|undefined">
<div class="tipbg">
<div style="background: #DDD;" class="opashowOuter qmpanel_shadow"
id="QMconfirm___opashow_">
<table cellspacing="0" cellpadding="0"
style="width: 447px; height: 163px;background: white;"
class="bd_upload">
<tbody>
<tr>
<td
style="height: 28px; border: none; background-image: none; cursor: move; overflow: hidden;"
class="editor_dialog_titlebar fdbody"
id="QMconfirm___title_td_"><div
id="QMconfirm___title_div_"
style="cursor: default; float: right; width: 40px; border: none; background-image:

none;"
class="fdbody">
<div onmouseout="this.className=‘editor_close‘;"
onmouseover="this.className=‘editor_close_mover‘;"
class="editor_close" id="QMconfirm___closebtn2_">
<img height="12" width="12" ondragstart="return false;"

src="http://www.codefans.net/jscss/demoimg/201109/ico_closetip.gif">
</div>
</div>
<div id="titleId2" class="editor_dialog_title">删除确认</div>
</td>
</tr>
<tr>
<td valign="top"
style="height: 131px; border: medium none; visibility: visible;"
class="editor_dialog_content " id="QMconfirm___content_"><div
class="mailinfo"
style="border: none; height: 100%; display: inline;">
<div class="">
<div class="cnfx_content">
<img align="absmiddle"
style="float: left; margin: 5px 10px 0; display:none;"

src="http://www.codefans.net/jscss/demoimg/201109/ico_question.gif">
<table style="width: 350px; height: 80px;">
<tbody>
<tr>
<td style="vertical-align:

top;"><div class="b_size"

style="padding-top: 10px; word-break: break-all; line-height: 150%;">
<div>彻底删除

后邮件将无法恢复,您确定要删除吗?</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div style="display: none;" class="cnfx_status">
<input type="checkbox" id="QMconfirm__recordstatus"><label
for="QMconfirm__recordstatus"></label>
</div>
<div class="cnfx_btn">
<input type="button" value="确定" id="QMconfirm__confirm"
class="wd2 btn"><input type="button" value="取消"
style="display: ;" id="QMconfirm__cancel" class="wd2

btn"><input
type="button" value="" style="display: none;"
id="QMconfirm__never" class="wd2 btn">
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</span>
<div>http://www.999jiujiu.com/</div>
</BODY>
</HTML>

时间: 2024-11-13 05:37:42

仿QQ邮箱的弹出层,弹出确认框的相关文章

ios11,弹出层内的input框光标错位

之前开发了一个微信项目,安全上线,维护期中苹果手机突然出现光标错位现象,经过排查,发现是最新的ios11系统的锅. 具体情况:弹出层使用position: fixed:弹出层内附带input/textarea输入框,ios11系统的苹果机用户在点击输入框,出现键盘后,弹出层被顶上去,而光标还停留在原处,即出现错位情况. 解决思路: 解决光标错位:弹出层设置为position: absolute:body添加position: relative; 弹出层重新定位:获取滚动条高度,设置为弹出层Top

ios11,弹出层内的input框光标错位 键盘弹出时,输入信息,光标一直乱跳

之前开发了一个微信项目,维护期中苹果手机突然出现光标错位现象,经过排查,发现是最新的ios11系统的锅. 具体情况:弹出层使用position: fixed:弹出层内附带input/textarea输入框,ios11系统的苹果机用户在点击输入框,出现键盘后,弹出层被顶上去,而光标还停留在原处,即出现错位情况. 解决思路: 解决光标错位:弹出层设置为position: absolute:body添加position: fixed; 弹出层重新定位:获取滚动条高度,设置为弹出层Top值: funct

Android:仿QQ 发表说说/上传照片 弹出框

代码很简单,主要就是几个动画而已,图标什么的就随便找了几个,效果图:      动画说明: 1.点击右上角按钮,菜单从顶部下拉弹出,同时背景变暗; 2.再次点击右上角按钮,点击返回键,或者点击空白区域(也就是变暗的部分),菜单向上收回; 3.点击菜单上的按钮响应事件,同时菜单收回(效果同2) 主体代码: public class MainActivity extends Activity { //添加数据按钮 private ImageView addDataIv; //下拉功能菜单 priva

实现移动端弹出层弹出的时候页面不能滑动,关闭弹出层时页面恢复滑动

思路是:显示弹层时,禁用触摸事件 在你显示弹出框的时候:添加: function ShowDiv() { window.ontouchmove = function(e) { e.preventDefault && e.preventDefault(); e.returnValue = false; e.stopPropagation && e.stopPropagation(); return false; } } 在关闭弹层时,添加: function CloseDiv

关于移动端js弹出层滚动的时候 body层不可滚动的解决办法

最近在做移动端网站,在点击导航栏,弹出导航列表时,出现了问题.下滑列表时底层body也跟着滚动,连查带想的折腾了两天才解决这个问题.下面主要分享一下解决办法以及关键代码. 一.有的网友建议弹出层弹出时给 html 和 body 都加上"height:100%:overflow:hidden:",然而在手机上并没有什么卵用 二.结合弹出层加上"overflow-y:auto"依然不起作用 .... 后来经过网友的帮助,结合我的代码终于找到了解决的办法 我的项目是用vu

实用带多种CSS动画特效的jQuery弹出层插件hDialog.js

<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <link rel=&qu

移动端js弹出层滚动的时候 body层不可滚动的解决办法

原文:https://blog.csdn.net/queenzjl/article/details/53507661 一.有的网友建议弹出层弹出时给 html 和 body 都加上"height:100%:overflow:hidden:",然而在手机上并没有什么卵用 二.结合弹出层加上"overflow-y:auto"依然不起作用 三.加上touchmove事件:window.ontouchmove = function(e){e.preventDefault()

弹出层覆盖整个页面方法

弹出层透明背景加框的常用样式和结构 .alertMessageBg{ position:fixed; _position:absolute; width:100%; height:100%; left:0; top:0; background:#000; opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=50); z-index:97; display:none;}.alertMessageDivBorder{ position:fixed;

div滚动条弹出层效果

<%--总的弹出层--%> <div class="tcck" id="joinclub" style="display:none"> <table style="width:430px; height:7px;" border="0" cellpadding="0" cellspacing="0" > <tr style=&