弹出框的位置wboxxz
来源:互联网 发布:程序员爱逛的网站 编辑:程序博客网 时间:2024/06/05 17:16
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="../js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="../Plugins/Wbox/wboxxz.js" type="text/javascript"></script>
<style type="text/css">
.ModelLayout
{
width: 540px;
height: 384px;
background: transparent url('images/tx.jpg') left top no-repeat;
position: absolute;
top: 100px;
left: 0px;
z-index: 99;
padding: 100px 100px;
}
*
{
margin: 0px;
padding: 0px;
}
.icon
{
background-image: url("images/icon.png");
height: 4px;
width: 100%;
float: left;
}
.bkicon
{
background-image: url("images/bk.png");
background-color: transparent;
height: 68px;
width: 202px;
margin-top: 30px;
margin-right: 30px;
}
.bigdiv
{
height: 140px;
width: 100%;
font-family: 黑体;
background-color: #034650;
}
.imgdiv
{
float: left;
padding: 20px;
height: 94px;
width: 94px;
}
.title
{
font-size: 36px;
color: White;
padding-top: 20px;
}
.content
{
font-size: 24px;
color: #35d1cc;
}
.bkper
{
cursor: pointer;
font-size: 34px;
height: 68px;
line-height: 68px;
color: White;
margin-left: 10px;
}
.divsub
{
float: left;
margin-top: 10px;
}
.smallbk
{
background-image: url("images/smallbk.png");
background-color: transparent;
height: 44px;
width: 44px;
margin-left: 30px;
}
.qx
{
background-image: url("images/qx.png");
background-color: transparent;
height: 72px;
width: 214px;
margin-left: 50px;
float: left;
cursor: pointer;
}
.qd
{
background-image: url("images/qd.png");
background-color: transparent;
height: 72px;
width: 214px;
float: left;
cursor: pointer;
}
.popmsg
{
font-size: 36px;
color: White;
height: 150px;
line-height: 70px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div style="height: 80px; width: 100%; background-color: #005562">
<div style="padding-top: 20px; float: left;">
<div class="smallbk">
<span class="title" style="margin-left: 50px">
<%=bk %></span>
</div>
<div>
<a style="font-size: 34px; color: White; position: absolute; top: 20px; right: 20px;"
href="dhlog.aspx?user_id=<%=userid %>">兑换记录</a>
</div>
</div>
</div>
<div>
<%=userStr%>
</div>
<script language="JavaScript">
function dhbk(title, id, stock, bk) {
var loginStr = '<div class="ModelLayout"><div style="margin-left:-50px;">';
if (stock < 1) {
loginStr += '<div class="popmsg">' + title + '库存不足,请选择其他物品</div>';
}
else {
loginStr += '<div class="popmsg">兑换' + title + '花费' + bk + '确定吗?</div>';
}
loginStr += '<div class="qd" onclick="go(' + id + ')" ></div><div class="qx" onclick="$(\'.ModelLayout\').remove();"></div> </div></div>';
$(".ModelLayout").remove();
$("body").append(loginStr);
$(".ModelLayout").css("left", (($("body").width() - 646) / 2) + "px");
$(".ModelLayout").css("top", (getAbsoluteTop2("bkpop" + id) - getAbsoluteTop("bkpop" + id) + 100) + "px");
}
window.onscroll = function () {
$(".ModelLayout").css("top", document.body.scrollTop + 100 + "px");
}
function getAbsoluteTop(objectId) {
o = document.getElementById(objectId);
oTop = document.getElementById(objectId).getBoundingClientRect().top;
// oTop = o.offsetTop;
// while (o.offsetParent != null) {
// oParent = o.offsetParent
// oTop += oParent.offsetTop // Add parent top position
// o = oParent;
// }
if (oTop < 0) oTop = 0;
return oTop;
}
function getAbsoluteTop2(objectId) {
o = document.getElementById(objectId);
oTop = o.offsetTop;
while (o.offsetParent != null) {
oParent = o.offsetParent
oTop += oParent.offsetTop // Add parent top position
o = oParent;
}
return oTop;
}
function go(id) {
window.location.href = "dhaddress.aspx?id=" + id + "";
}
</script>
</form>
</body>
</html>
0 0
- 弹出框的位置wboxxz
- 设置alertdialog弹出框的弹出位置
- 自定义弹出框的位置
- 困扰很久的弹出框位置控制
- jquery的弹出提示框位置居中
- jQuery设置弹出框的位置
- PopupWindow的弹出位置
- easyui弹出框位置超出
- jquery实现的获取鼠标位置并弹出提示框
- 解决android7.0popupwindow弹出框位置不正确的问题
- 弹出窗口的显示和位置PopUpManager
- c# 弹出窗体的显示位置设定
- 修改alertDialog的透明度和弹出位置
- flex的PopUpManager弹出窗口位置
- 点击动画弹出指定位置的dialog
- MFC设置对话框弹出的位置
- setGravity修改Toast弹出的位置
- Android popupwindow 弹出的位置问题
- Proxy Server代理服务器
- Namespace declaration statement has to be the very first statement in the script
- Mybatis3 缓存收回策略(eviction)
- RSA密钥之C#格式与Java格式转换
- 黑马程序员 -- C语言 函数概念 使用 执行 注意点
- 弹出框的位置wboxxz
- VMware Ubuntu 12.04分区动态调整小记
- 强大的UI修改工具 UIAppearance
- Windows下给SourceTree配置外部比较工具BeyondCompare
- 连接池--只在系统启动时启动一次
- 读取资源文件的工具类.
- Java的几种定时任务
- linux编译连接选项解析
- HDU—— 5174 Ferries Wheel