当前位置:网站首页>JQ picture amplifier
JQ picture amplifier
2022-06-28 05:51:00 【Yuanxiaobai】
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
.div{
width:500px;
height: 282px;
border: 1px solid gray;
}
.dv{
width:100px;
height: 100px;
//display: none;
border: 1px solid gray;
border-radius: 50px;
background-image: url(img/1.jpg);
position: absolute;
}
</style>
</head>
<body>
<div class="div"><img src="img/1.jpg" width="500px"/></div>
</body>
<script src="jq/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jq/jquery-1.7.1.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(function(e){
$(".div").mousemove(function(e){
var x=e.pageX;
var y=e.pageY;
$(".div").append("<div class='dv'></div>");
$(".dv").css({"left":x,"top":y});
x=x*2-70;
y=y*2-65;
//console.log(x+"\t"+y);
if(x<=0){
x=0;
}
if(y<=0){
y=0;
}
if(x>=900){
x=900;
}
if(y>=460){
y=460;
}
//$(".dv").show();
$(".dv").css("backgroundPositionX",-x);
$(".dv").css("backgroundPositionY",-y);
});
$(".div").mouseout(function(e){
//$(".dv").hide();
$(".dv").remove();
});
})
</script>
</html>

边栏推荐
猜你喜欢
随机推荐
Main functions of 5ggnb and ng ENB
学术搜索相关论文
Oracle 条件、循环语句
Syn retransmission caused by IPVS
Animation de ligne
如何在您的Shopify商店中添加实时聊天功能?
Binder面试之:内存管理单元
bash install.sh ********错误
Pre training model parameter mismatch
若依实现下拉框
[CAD drawing Video] AutoCAD 2014 master's way
Application of Beidou No.3 short message terminal in dam safety monitoring scheme
What is webrtc?
Install fmpefg
Using pytorch and tensorflow to calculate the confusion matrix of classification model
脚本语言和编程语言
Capacity scheduling absolute value configuration queue usage and pit avoidance
RL 实践(0)—— 及第平台辛丑年冬赛季【Rule-based policy】
Filecoin黑客松开发者大赛
5g network overall architecture



![A full set of excellent SEO tutorials worth 300 yuan [159 lessons]](/img/d7/7e522143b1e6b3acf14a0894f50d26.jpg)




