博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
a-z索引_拖放Z索引堆叠
阅读量:2512 次
发布时间:2019-05-11

本文共 857 字,大约阅读时间需要 2 分钟。

a-z索引

MooTools Drag Opacity

In an example for a previous post, I showed you . One bit I didn't account for was element stacking and bringing the most recent element to the top of the stack. To do so, we'll need to use a variable that represents the highest zIndex, which we'll be incrementing.

在上一篇文章的示例中,我向您 。 我没有考虑的一点是元素堆叠并将最新的元素带到栈顶。 为此,我们需要使用一个代表最高zIndex的变量,我们将对其进行递增。

MooTools JavaScript (The MooTools JavaScript)

window.addEvent('domready',function() {	var zIndex = 2;	$$('.draggable').each(function(el) {		var drag = new Drag.Move(el,{			grid: false,			preventDefault: true,			onStart: function() {				el.setStyle('z-index',zIndex++); //increment!			}		});	});});

As you probably expected, the process is as simple as it gets. Correct stacking order is incredibly important as you don't want items to be wrongly buried.

如您所料,该过程非常简单。 正确的堆叠顺序非常重要,因为您不希望物品被错误地掩埋。

翻译自:

a-z索引

转载地址:http://gzpwd.baihongyu.com/

你可能感兴趣的文章
python3 序列分片记录
查看>>
Atitit.git的存储结构and 追踪
查看>>
atitit 读书与获取知识资料的attilax的总结.docx
查看>>
B站 React教程笔记day2(3)React-Redux
查看>>
找了一个api管理工具
查看>>
Part 2 - Fundamentals(4-10)
查看>>
使用Postmark测试后端存储性能
查看>>
NSTextView 文字链接的定制化
查看>>
第五天站立会议内容
查看>>
ATMEGA16 IOport相关汇总
查看>>
JAVA基础-多线程
查看>>
面试题5:字符串替换空格
查看>>
[Codevs] 线段树练习5
查看>>
Amazon
查看>>
component-based scene model
查看>>
Echart输出图形
查看>>
hMailServer搭建简单邮件系统
查看>>
从零开始学习jQuery
查看>>
Spring+SpringMVC+MyBatis深入学习及搭建(四)——MyBatis输入映射与输出映射
查看>>
opacity半透明兼容ie8。。。。ie8半透明
查看>>