简体   繁体   English

禁用HTML元素

[英]Disable HTML elements

How do I disable page? 如何禁用页面?

I have a following code written using scriptaculous/prototype. 我有以下代码使用脚本/原型编写。 It just moves a div to the center (actually at 100,100). 它只是将div移动到中心(实际上是100,100)。 I want the entire background (all elements) to be disabled except this div. 我希望禁用除此div之外的整个背景(所有元素)。

new Effect.Move(element, {x:100,y:100,duration:1});

I would suggest covering the rest of your elements in a div and then using the z-index to move your centering div on top. 我建议在div中覆盖其余元素,然后使用z-index将居中的div移动到顶部。 Similar to below. 类似于下面。

#disableElements{  
 display:none;  
 position:fixed;  
 height:100%;  
 width:100%;  
 top:0;  
 left:0;  
} 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM