<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>index</title>
<style>
*{
font-family: 微软雅黑;
margin: 0px;
padding: 0px;
}
#imgid{
width: 128px;
height: 128px;
position: absolute;
top: 0px;
left: 0px;
overflow: hidden;
}
</style>
</head>
<body>
<div id="imgid">
<img src="bk.png">
</div>
</body>
<script>
imgobj=document.getElementById('imgid');
screenHeight=document.documentElement.clientHeight;//获取可视屏幕的高度
imgHeight=128;
diffHeight=screenHeight-imgHeight;
screenWidth=document.documentElement.clientWidth;//获取可视屏幕的宽度
imgWidth=128;
diffWidth=screenWidth-imgWidth;
y
JavaScript实现弹力球特效
最新推荐文章于 2021-03-20 17:52:01 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)