js案例之鼠标跟随jquery版(实例讲解)
(编辑:jimmy 日期: 2025/10/25 浏览:3 次 )
废话不多说,直接上代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
body,div{
margin:0;
padding:0;
}
img{
display:block;
border:none;
}
.box{
position:relative;
width:450px;
margin:20px auto;
}
.box img{
float:left;
margin-left:10px;
width:100px;
height:75px;
border:1px solid #008000;
}
#mark{
display:none;
position:absolute;
top:0;
left:0;
z-index:10;
width:400px;
height:300px;
border:1px solid #0077b0;
}
#mark img{
float:inherit;
margin-left:0;
border:none;
width:100%;
height:100%;
}
</style>
</head>
<body>
<div class='box' id='box'>
<img src="/UploadFiles/2021-04-02/apple_1.jpg">
以上这篇js案例之鼠标跟随jquery版(实例讲解)就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。
下一篇:基于input框覆盖掉数字英文的实例讲解