Dhtml:3个不同高度的三维可拖动图层的例子

HTML 的许愿墙效果页面 效果图: JS部分代码: <script> var input,containe; window.onload = function(){ input = document.getElementById('input'); container = document.getElementById('container'); color=getRandomCol... 阅读详情
<!-- xWin by WildWind<http://wildcity.126.com> -->
<html>
<head>
<title>_xWin</title>
<style type='text/css'>
<!--
a:visited{text-decoration:none;color:slategray;}
a:hover{text-decoration:underline;color:slategray;}
a:link{text-decoration:none;color:slategray;}
-->
</style>
<script language=JScript>
<!--
//可以打包为js文件;
var x0=0,y0=0,x1=0,y1=0;
var offx=6,offy=6;
var moveable=false;
var hover='orange',normal='slategray';//color;
var index=10000;//z-index;
//开始拖动;
function startDrag(obj)
{
//锁定标题栏;
obj.setCapture();
//定义对象;
var win = obj.parentNode;
var sha = win.nextSibling;
//记录鼠标和层位置;
x0 = event.clientX;
y0 = event.clientY;
x1 = parseInt(win.style.left);
y1 = parseInt(win.style.top);
//记录颜色;
normal = obj.style.backgroundColor;
//改变风格;
obj.style.backgroundColor = hover;
win.style.borderColor = hover;
obj.nextSibling.style.color = hover;
sha.style.left = x1 + offx;
sha.style.top = y1 + offy;
moveable = true;
}
//拖动;
function drag(obj)
{
var win = obj.parentNode;
var sha = win.nextSibling;
if(moveable)
{
 win.style.left = x1 + event.clientX - x0;
 win.style.top = y1 + event.clientY - y0;
 sha.style.left = parseInt(win.style.left) + offx;
 sha.style.top = parseInt(win.style.top) + offy;
}
}
//停止拖动;
function stopDrag(obj)
{
var win = obj.parentNode;
var sha = win.nextSibling;
win.style.borderColor = normal;
obj.style.backgroundColor = normal;
obj.nextSibling.style.color = normal;
sha.style.left = obj.parentNode.style.left;
sha.style.top = obj.parentNode.style.top;
//放开标题栏;
obj.releaseCapture();
moveable = false;
}
//获得焦点;
function getFocus(obj)
{
index = index + 2;
var idx = index;
obj.style.zIndex=idx;
obj.nextSibling.style.zIndex=idx-1;
}
function min(obj)
{
var win = obj.parentNode.parentNode;
var sha = win.nextSibling;
var tit = obj.parentNode;
var msg = tit.nextSibling;
var flg = msg.style.display=="none";
if(flg)
{
 win.style.height = parseInt(msg.style.height) + parseInt(tit.style.height) + 2*2;
 sha.style.height = win.style.height;
 msg.style.display = "block";
 obj.innerHTML = "0";
}
else
{
 win.style.height = parseInt(tit.style.height) + 2*2;
 sha.style.height = win.style.height;
 obj.innerHTML = "2";
 msg.style.display = "none";
}
}
function cls(obj)
{
var win = obj.parentNode.parentNode;
var sha = win.nextSibling;
win.style.visibility = "hidden";
sha.style.visibility = "hidden";
}
//创建一个对象;
function xWin(id,w,h,l,t,tit,msg)
{
index = index+2;
this.id   = id;
this.width  = w;
this.height = h;
this.left  = l;
this.top   = t;
this.zIndex = index;
this.title  = tit;
this.message = msg;
this.obj   = null;
this.bulid  = bulid;
this.bulid();
}
//初始化;
function bulid()
{
var str = ""
 + "<div id=xMsg" + this.id + " "
 + "style='"
 + "z-index:" + this.zIndex + ";"
 + "width:" + this.width + ";"
 + "height:" + this.height + ";"
 + "left:" + this.left + ";"
 + "top:" + this.top + ";"
 + "background-color:" + normal + ";"
 + "color:" + normal + ";"
 + "font-size:10px;"
 + "font-family:Verdana;"
 + "position:absolute;"
 + "cursor:default;"
 + "border:2px solid " + normal + ";"
 + "' "
 + "onmousedown='getFocus(this)'>"
  + "<div "
  + "style='"
  + "background-color:" + normal + ";"
  + "width:" + (this.width-2*2) + ";"
  + "height:20;"
  + "color:white;"
  + "' "
  + "onmousedown='startDrag(this)' "
  + "onmouseup='stopDrag(this)' "
  + "onmousemove='drag(this)' "
  + ">"
  + "<span style='width:" + (this.width-2*12-4) + ";padding-left:3px;'>" + this.title + "</span>"
  + "<span style='width:12;border-width:0px;color:white;font-family:webdings;' onclick='min(this)'>0</span>"
  + "<span style='width:12;border-width:0px;color:white;font-family:webdings;' onclick='cls(this)'>r</span>"
  + "</div>"
  + "<div style='"
  + "width:100%;"
  + "height:" + (this.height-20-4) + ";"
  + "background-color:white;"
  + "line-height:14px;"
  + "word-break:break-all;"
  + "padding:3px;"
  + "'>" + this.message + "</div>"
 + "</div>"
 + "<div style='"
 + "width:" + this.width + ";"
 + "height:" + this.height + ";"
 + "top:" + this.top + ";"
 + "left:" + this.left + ";"
 + "z-index:" + (this.zIndex-1) + ";"
 + "position:absolute;"
 + "background-color:black;"
 + "filter:alpha(opacity=40);"
 + "'>?</div>";
 //alert(str);
document.body.insertAdjacentHTML("beforeEnd",str);
}
//-->
</script>
<script language='JScript'>
<!--
function initialize()
{
var a = new xWin("1",160,200,200,200,"Message","xWin <br> A Cool Pop Div Window<br>Version:1.0<br>2002-8-13");
var b = new xWin("2",240,200,100,100,"Wildwind's Msgbox","Welcome to visited my personal website:<br><a href=http://www14.brinkster.com/wildcity target=_blank>http://wildcity.126.com</a><br>and u can also sign my guestbook at:<br><a href=http://www14.brinkster.com/wildcity/gbook target=_blank>http://wildcity.126.com/gbook</a><br><br>thx!!! =)...");
var c = new xWin("3",200,160,250,50,"Copyright","Copyright by <a href='mailto:wildwind_zz@21cn.com'>Wildwind</a>!");
}
window.onload = initialize;
//-->
</script>
</head>
<body onselectstart='return false' oncontextmenu='return false'>
</body>
</html>
微信许愿墙 H5网页版,主要用JS +H5实现移动端留言墙功能 微信许愿墙 H5网页版,主要用JS +H5实现移动端留言墙功能,在别人的基础上对手机端使用优化了一下。 立即下载

相关推荐

thinkphp许愿墙HTMl模板

许愿墙HTML开发模板,学习代码,对thinkphp的深入了解。

许愿墙HTML+CSS

HTML5+CSS3

jiang5678900的博客 1131

HTML许愿墙代码

HTML许愿墙代码,需求1:模拟数据库获取信息,然后在页面上生成数组的长度个tip,然后分别问起内容进行修改;需求2:点击内容,提高层级;点击关闭按钮,删除tip标签;双击顶部,删除标签.....

许愿墙 许下你的愿望

许愿墙 许下你的愿望

bibaokesi的博客 1249

js+css许愿墙

许愿墙,可拖拽,可隐藏,操作方便,适合新手使用和模仿,纯js+css效果

js 实现许愿墙代码

通过div+js 实现了类似许愿墙样式的图片效果,单机图片显示更具体的详情

制作简单许愿墙

在生活中,许愿墙是一种承载愿望的实体,来源于“许愿树”的习俗。后来人们逐渐改变观念,开始将愿望写在小纸片上,然后贴在墙上,这就是许愿墙。随着互联网的发展,人们又将许愿墙搬到了网络上,通过网站上的一个空间页面,来发表和展示愿望。

weixin_68841941的博客 2658

简易可拖拽许愿墙

可以通过写入愿望并点击添加生成愿望卡,所有的愿望卡颜色为随机生成(该代码是在网页某原有代码上改写的,原来的只生成固定数量的愿望卡,且形状一样,经过改写后可以支持自己手动填写愿望并生成),其中的add.php是用来返回json的,因为我在写生成新的愿望卡时局部刷新,用的是ajax,其实完全可以用js就搞定。

HTML5联系--许愿墙

html5--许愿墙练习

weixin_74183841的博客 552

HTML制作许愿墙-拖动东西放到许愿墙上

HTML制作许愿墙-拖动东西放到许愿墙上

MDPI期刊投稿全流程解析:从注册到提交的实用指南

本文详细解析了向MDPI期刊投稿的全过程,从注册账号、完善个人资料、上传稿件,到填写作者信息、推荐审稿人及提交附信等关键步骤。指南强调了使用机构邮箱、遵循期刊模板、认真准备Cover Letter等实用技巧,旨在帮助作者高效、规范地完成投稿,避免常见错误,提升稿件处理效率。

weixin_29250403的博客 941

Html+Css+js实现带有雪花飘落的许愿墙效果

开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】大厂面试问深度,小厂面试问广度,如果有同学想进大厂深造一定要有一个方向精通的惊艳到面试官,还要平时遇到问题后思考一下问题的本质,找方法解决是一个方面,看到问题本质是另一个方面。还有大家一定要有目标,我在很久之前就想着以后一定要去大厂,然后默默努力,每天看一些大佬们的文章,总是觉得只有再学深入一点才有机会,所以才有恒心一直学下去。开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】

m0_57502067的博客 922

银河麒麟V10ServerSP3中安装Nacos2.4.x详细教程

银河麒麟V10ServerSP3中安装Nacos2.4.x详细教程

yuanjinshenglife的专栏 1307

简易的许愿墙效果实现

简易的许愿墙效果实现

m0_72298598的博客 593

KUKA机器人与S7-1200 PLC实现Profinet通讯配置步骤详解

在工业自动化产线中,PLC与工业机器人之间的高效数据交换是控制逻辑落地的关键。传统硬接线方案在信号点多时布线复杂、故障排查困难,而现场总线技术通过一根网线即可实现主从设备间的周期通讯。Profinet作为主流工业以太网协议,由S7-1200作为IO Controller主站,KUKA机器人作为IO Device从站,在WorkVisual与TIA Portal中完成设备组态、I/O映射及信号分配,即可替代成捆电缆,稳定传输启停、状态及报警信号。这一方案适用于汽车、3C、物流等行业的自动化产线,尤其适合需要扩

weixin_42519985的博客 261

华为产品安全基线

一、敏感信息安全传输 1、采用HTTPS安全协议传输 2、客户端本地保存的敏感信息,需要先加密再保存使用,不可逆支持PBKDF2(迭代10000次)加密保存,可逆支持AES256+IV保存,密钥支持可更新 二、认证鉴权 1、License中心与分析节点分布式部署,需要做用户名+口令安全认证,支持使用HTTPS安全协议。 2、客户端登录支持防暴力破解,支持验证码,多次连续尝试登陆失败后锁定账...

zileixu的博客 1万+

html css制造 许愿墙,许愿墙的制作

body {margin:0px;padding:0px;font-size:12px;text-align:center;}body > div {text-align:center; margin-right:auto; margin-left:auto;}.content{width:900px;}.content .left{float:left;width:20%;border:1...

weixin_32376927的博客 2168

SAP MM新手避坑指南:工厂间调拨用301还是303?手把手教你选对移动类型

本文深入解析SAP MM模块中工厂间调拨的301与303移动类型,帮助新手避开常见陷阱。通过对比一步法(301)和两步法(303+305)的核心差异、适用场景及财务影响,提供清晰的决策框架和实战技巧,确保库存调拨的准确性和效率。

weixin_29223603的博客 360

简单制作许愿墙HTML

【代码】简单制作许愿墙HTML。

gvgfxjhv的博客 721

高精地图构建:Lidar SLAM与视觉SLAM对比

高精地图构建:Lidar SLAM与视觉SLAM对比​ ,人工智能,计算机视觉,大模型,AI,本文围绕高精地图构建,对比 Lidar SLAM 与视觉 SLAM。Lidar SLAM 通过激光获取点云数据,精度高、环境适应性强但成本高、数据量大;视觉 SLAM 利用图像,成本低、信息丰富却受光照影响大、深度获取难。还解析了 SLAM、点云等关键概念,介绍了两者融合趋势、应用案例、技术挑战及未来方向,也给出常见问题解答,为相关领域应用与学习提供参考。

不踩坑,不知道坑有多深;不总结,踩过的坑白踩。 17万+

【异常】Antigravity IDE 登录异常与网络连接错误排查指南

在使用 Google 推出的 AI 原生 IDE时,部分用户可能会遇到身份验证失效与网络环境冲突导致的叠加错误。本文将针对此类典型故障提供完整的解决思路。

奶爸的编程之路,也就一周冷个三天 2174

HTML新年许愿墙代码,网页版春节许愿墙代码,兔年许愿墙代码

HTML新年许愿墙代码,网页版春节许愿墙代码,兔年许愿墙代码。

Python代码大全 1601

STM32 cubeMX配置串口重定向

这篇文章主要讲解什么是串口重定向,为什么要串口串口重定向。使用printf函数和上位机通信是非常的方便的。希望大家都能够掌握。

m0_49476241的博客 4577

如何实现许愿墙

实现效果 <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <link rel="stylesheet" href="css/style.css"> </head> <..

qq_50852523的博客 1611

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

实现简单的许愿墙效果HTML

简单的许愿墙的实现

Zhao_Gao_的博客 1340

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain&#39;s apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath(&#39;DeepLearnToolbox&#39;));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand(&#39;state&#39;,0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = &#39;sigm&#39;;%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, &#39;Too big error&#39;);```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, &#39;Too big error&#39;);```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: 下大雪啦
下一篇: CSS效果的隐藏/显示型菜单
AppleBBS
博客等级 码龄22年 415粉丝 803原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值