大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 网页设计 -> DREAMWEAVER -> 巧制可全屏拖动的图片

巧制可全屏拖动的图片

时间: 2021-07-31 作者:daque

    咱们不妨用鼠标把dreamweaver的层在页面内拖动,但要全屏拖动就艰巨了,底下是一种实行的本领:

创造办法:

一、筹备图片,取名http://www.okasp.com/techinfo/back.jpg,如次:

二、建一个htm文献取名drag.htm,并写入下列代码:

< html>  < head>  < title>可拖动的图片< /title>  < meta http-equiv="content-type" content="text/html; charset=utf8">  < /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="http://www.okasp.com/techinfo/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=utf8">  < 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>

好了,生存看看功效吧!

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.