网易,佳人有约登录效果
Jun 13, 2016 am 11:21 AM
我们先把上面拆解出来的功能完成!
1。透明层(显示与隐藏)
关键是要同时设置下面这几个样式,才能使主流浏览器上都现实透明的效果。
filter= 'Alpha(Opacity=50)';
MozOpacity ='0.5';
opacity='0.5';
可能很多人都知道,类似这种在透明层上现实东西的效果,多源至于一个称为lightbox的效果。这里我也这样命名:
function Lightbox(id)
{
this.box = this.createBox();
this.id = id||'lightbox_id';
}
Lightbox.prototype=
{
createBox:function(){
var box = document.getElementById(this.id)||document.createElement('div');
box.id = box.id||this.id;
with(box.style){
position='absolute';
left='0';
top='0';
width='100%';
height='100%';
zIndex='1000';
background='#ccc';
filter= 'Alpha(Opacity=50)';
MozOpacity ='0.5';
opacity='0.5';
display='none';
}
document.body.appendChild(box);
return box;
},
show:function(){
this.box.style.height= document.documentElement.scrollHeight+'px';
this.box.style.display = '';
},
hide:function(){
this.box.style.display = 'none';
}
}
2。表单提交(ajax或iframe)
迅雷上的是用的iframe,我们这里先说iframe
iframe就简单多了,form的target属性设置为某个iframe的name就可以了。设置iframe的onload属性,那么当表单提交完成以后他就会执行相应处理。

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Users encounter rare glitches: Samsung Watch smartwatches suddenly experience white screen issues

Kyushu Fengshen Assassin 4S Radiator Review Air-cooled 'Assassin Master' Style

Exquisite light and shadow art in spring, Haqu H2 is the cost-effective choice

Huntkey MX750P full module power supply review: 750W of concentrated platinum strength

Blizzard's national server returns to the scene to watch, Valina shows off her snow-skinned skin and long legs, and Dva in her pink skirt is so cute!

How to deeply clean the hidden junk on your phone (completely remove junk from your phone's memory)

NetEase announced the suspension of 'Marvel Super War', which was Marvel's first MOBA game!
