图片在网页上移动
来源:互联网 发布:淘宝代练lol安全吗 编辑:程序博客网 时间:2024/04/28 17:50
<html>
<head>
<title>图片内容</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
body {CURSOR: url('/images/hmove.cur')}
</style>
<SCRIPT language=JavaScript>
drag = 0
move = 0
function init() {
window.document.onmousemove = mouseMove
window.document.onmousedown = mouseDown
window.document.onmouseup = mouseUp
window.document.ondragstart = mouseStop
}
function mouseDown() {
if (drag) {
clickleft = window.event.x - parseInt(dragObj.style.left)
clicktop = window.event.y - parseInt(dragObj.style.top)
dragObj.style.zIndex += 1
move = 1
}
}
function mouseStop() {
window.event.returnValue = false
}
function mouseMove() {
if (move) {
dragObj.style.left = window.event.x - clickleft
dragObj.style.top = window.event.y - clicktop
}
}
function mouseUp() {
move = 0
}
function bbimg(o){
var zoom=parseInt(o.style.zoom, 10)||100;
zoom+=event.wheelDelta/12;
if (zoom>0) o.style.zoom=zoom+'%';
return false;
}
function featsize()
{
var width1=images2.width;
var height1=images2.height;
var width2=760;
var height2=500;
var h=height1/height2;
var w=width1/width2;
if(height1<height2&&width1<width2)
{
images1.height=height1;
images1.width=width1;
}
else
{
if(h>w)
{
images1.height=height2;
images1.width=width1*height2/height1;
}
else
{
images1.width=width2;
images1.height=height1*width2/width1;
}
}
block1.style.left = 0;
block1.style.top = 0;
}
</SCRIPT>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="init()" oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()">
<noscript><iframe src=*></iframe></noscript>
<div id='hiddenPic' style='position:absolute; left:433px; top:258px; width:77px; height:91px; z-index:1; visibility: hidden;'><img name='images2' src='UploadPhotos/200412/20041213105402955.jpg' border='0'></div><div id='block1' onmouseout='drag=0' onmouseover='dragObj=block1; drag=1;' style='z-index:10; height: 60; left: 0; position: absolute; top: 0; width: 120'><img name='images1' src='UploadPhotos/200412/20041213105402955.jpg' border='0' onmousewheel='return bbimg(this)' onload='featsize()'></div>
</body>
</html>
- 图片在网页上移动
- 在窗体上移动控件
- 在窗体上移动控件
- Control Study -> 当鼠标在图片上移动时,放大图像区域
- Control Study -> 当鼠标在图片上移动时,放大图像区域
- Control Study -> 当鼠标在图片上移动时,放大图像区域
- 在指定方向(角度)上移动
- 点P在椭圆上移动
- 视图在画出得路径上移动
- android 小船在 水波上移动
- 使用鼠标在面板上移动消息
- Canvas坦克在画布上移动
- 在面板上移动的字
- 顶部图片随滑动上移动和向下放大
- 经纬度随鼠标在地图上移动随时显示
- 鼠标在菜单上移动时显示菜单提示
- 经纬度随鼠标在地图上移动随时显示
- UIImageView动画:显示了something在屏幕上移动。
- 全球华人大签名反对日本成为安理会常任理事国
- 今天解决的问题:在vc中往Access数据库写中文时出现乱码。
- RSS的使用教程
- Tomcat下配置MySQL数据库连接池
- 使用ADO.NET的最佳实践
- 图片在网页上移动
- Java学习过程应该深入理解的一些重点
- 图片缩小放大脚本
- OCI编程(一)
- 这家伙很懒语录(我懒故我在篇)
- 生存是一种权利还是义务?
- Java数据库编程中查询结果的表格式输出
- 一些有趣的名字
- 开始毕业设计!