This commit is contained in:
wlh
2015-01-08 21:53:48 +08:00
parent e31afd76bb
commit b4f751bb8a
5 changed files with 28 additions and 33 deletions
+3 -6
View File
@@ -1,7 +1,4 @@
/*
* Mask: You can use the function in your project,
* when don't want the user to pay attention to inside information of DIV.
*/
(function(exports){
var Mask = function(id/*target element id*/, otherCssObj /*is a json obj, like css text*/){
var mask = document.getElementById(id);
@@ -10,8 +7,8 @@
this.div = document.createElement('div');
this.div.style.position = 'absolute';
this.div.style.left = mask.offsetLeft + 'px';
this.div.style.top = mask.offsetTop + 'px';
// this.div.style.left = mask.offsetLeft + 'px';
// this.div.style.top = mask.offsetTop + 'px';
this.div.style.zIndex = 300;
this.div.style.width = width + 'px';
this.div.style.height = height + 'px';