打开页面后出现一个飘动的窗口(网页),效果很酷的哟

来源:互联网   编辑:思良  发表时间:2015-07-10  关注度:1207  

在<body>中输入即:
<body bgcolor="#ffffff" onl oad="doFlyMe()">

在<body></body>中输入代码:
<script>

var URL= "photo/flyingwindow_show.html";

// Set size of popup
var W= 130; // not less than 100
var H= 180; // not less than 100

// Set margin from edge of screen
var M= 100;

// Set speed
var speed = 20;

// Set increment of motion
var increment = 16;

// Do not edit below this line
//============================
var nowY=M;var nowX=M;
var theWidth=window.screen.width;
var theHeight=window.screen.height;
var limitX=theWidth-W-M;
var limitY=theHeight-H-M;
var s="width="+W+",height="+H;
function doFlyMe(){
P=window.open(URL,"A",s); 
P.resizeTo(W,H);
P.moveTo(M,M);
P.focus(); 
D();}
function D(){
if (nowY<=limitY){
P.moveTo(nowX,nowY);
P.focus();
nowY+=increment;
T=setTimeout("D()",speed);
}else{
clearTimeout(T);
nowY=limitY;
P.moveTo(nowX,nowY);
P.focus();
R();}}
function R(){
if (nowX<=limitX){
P.moveTo(nowX,nowY);
P.focus();
nowX+=increment;
T=setTimeout("R()",speed);
}else{
clearTimeout(T);
nowX=limitX;
P.moveTo(nowX,nowY);
P.focus();
U();}}
function U(){
if (nowY>=M){
P.moveTo(nowX,nowY);
P.focus();
nowY-=increment;
T=setTimeout("U()",speed);
}else{
clearTimeout(T)
nowY=M;
P.moveTo(nowX,nowY);
P.focus();
L();}}
function L(){
if (nowX>=M){
P.moveTo(nowX,nowY);
P.focus();
nowX-=increment;
T=setTimeout("L()",speed);
}else{
clearTimeout(T);
nowX=M;
P.moveTo(nowX,nowY);
P.focus();}}

</script>


原文:http://www.feiyes.net/Js/Show.asp?id=787&T=1

    支付宝扫码领红包,不用多说,用过的人都知道,双赢的,你得红包,我得到同等推广红包,比如你扫到1元,我也得1元,大家得到的红包可以去实体店消费!新用户至少10元以上哦,每天都有!希望大家每天来本站扫码!感谢感谢!

    把打赏改成扫码红包了!支持本站就扫码下!


下一篇:10款让人惊叹的HTML5/jQuery图片动画特效


上一篇:基于CSS3+jQuery实现的动态模糊切换特效导航菜单


小提示:按 回车[Enter]键 返回,按 ←键 返回上一页, 按 →键 进入下一页。

网友评论(0条评论)

选择头像
     

新闻评论(共有 0 条评论)

手机访问

本站APP

联系我

加我微信