代码如下:
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "https://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>无标题文档</title><script type="text/javascript" src="jquery-1.4.4.js"></script>
<script type="text/javascript">
$(function(){
$("html").mousemove(function(e){
$("#a").css("left",e.pagex).css("top",e.pagey);
});
});
</script>
<style type="text/css">
.a {
width:200px;
height:100px;
position:absolute;
background-color:rgb(0,0,0);
}
</style>
</head>
<body>
<img src="图片" id="a" name="a" class="a" >
只做了一个简单的实例
</body>
</html>
如对本文有疑问, 点击进行留言回复!!
同事牛逼啊,写了个隐藏 bug,我排查了 3 天才解决问题!
【JavaScript笔记(一)】万丈高楼平地起 - 基本概念篇
轻松解决 org.apache.taglibs.standard.tlv.JstlCoreTLV 困惑
网友评论