当前位置:首页 > 设计在线 > 平面动画 > Photoshop > Dreamweaver巧制可全屏拖动的图片

Dreamweaver巧制可全屏拖动的图片

点击次数:36 次 发布日期:2008-11-21 11:22:22 作者:源代码网
源代码网推荐

源代码网整理以下我们可以用鼠标把Dreamweaver的层在页面内拖动,但要全屏拖动就困难了,下面是一种实现的方法:

源代码网整理以下制作步骤:

源代码网整理以下一、准备图片,取名back.jpg。

源代码网整理以下二、建一个htm文件取名drag.htm,并写入下列代码:

源代码网整理以下

以下为引用的内容:
  < html>
  < head>
  < title>可拖动的图片< /title>
  < meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  < /head>
  < body bgcolor="#FFFFFF" text="#000000" scroll=no topmargin=0 leftmargin=0 onmousedown="x=event.x;y=event.y;setCapture()" onmouseup="releaseCapture()" onmousemove="if(event.button==1)top.moveTo(screenLeft+event.x-x,screenTop+event.y-y)" ondblclick="self.close()">
  < img src="back.jpg" width="120" height="120" style="cursor:hand;border:3 gold ridge">
  < /body>
  < /html>

源代码网整理以下drag.htm便是一个可以被拖动的页面。

源代码网整理以下三、在其他页面中调用drag.htm,加上下面的代码:

源代码网整理以下

以下为引用的内容:
  < head>
  < title>可全屏拖动的图片< /title>
  < meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  < script language="JavaScript">
  function drag(){
  var win;
  win=window.open("drag.htm","","fullscreen");
  win.moveTo(200,200);
  win.resizeTo(126,126);
  win.focus();
  }
  < /script>
  < /head>

源代码网整理以下并用链接打开:

源代码网整理以下< a href="javascript:drag()">点击这里< /a>

源代码网整理以下好了,保存看看效果吧!

源代码网供稿.
网友评论 (0)
会员中心
设计在线
本站推荐
设计在线之精华