app开发和前端联系|面试前端开发要问什么问题|前端开发什么适合练手
html 代码
<!DOCTYPE html>
<head>
<meta http-equiv=”Content-Language” content=”zh-cn” />
<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″>
<title>用鼠标滚轮滚动控制图片的缩小放大</title>
<script language=”javascript”>
function bbimg(o) {
var zoom = parseInt(o.style.zoom, 10) || 100;
zoom += event.wheelDelta / 12;
if (zoom > 0) o.style.zoom = zoom + ‘%’;
return false;
}
</script>
</head>
<body>
<p>将鼠标放在图片上,点击一下,然后滚动鼠标滚轮试试看</p>
<p>
<img border=”0″ src=”http://www.qiyimi.cn/Topper/js/kindeditor/attached/image/20150814/20150814103556_6950.png” onmousewheel=”return bbimg(this)”>
</p>
<p> </p>
<p> </p>
<p> </p>
</body>
</html>
app开发前端责任概述|app前端用什么语言开发|前端不能开发原生app
» 本文来自:前端开发者 » 《网页前端开发用鼠标滚轮滚动控制图片的缩小放大》
» 本文链接地址:https://www.rokub.com/5185.html
» 您也可以订阅本站:https://www.rokub.com
评论前必须登录!
注册