
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
drop-animation
Advanced tools
浏览器中的掉落动画 🎾
npm install drop-animation --save
import Dropper from 'drop-animation';
// 新建实例
function onClick() {
new Dropper({
element: '<div class="dropper"></div>',
startPosition: {
x: x + width / 2,
y: y + height / 2,
},
endPosition,
width,
height,
});
}
参数 Object opts:
| 属性 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| element | Element | String | 是 | - | 掉落元素 |
| container | Element | 否 | document.body | 父级容器 |
| startPosition.x | Number | 否 | 0 | 起点位置横坐标,单位:px |
| startPosition.y | Number | 否 | 0 | 起点位置纵坐标,单位:px |
| endPosition.x | Number | 否 | 0 | 终点位置横坐标,单位:px |
| endPosition.y | Number | 否 | 0 | 终点位置纵坐标,单位:px |
| width | Number | 否 | 0 | 掉落元素宽度,单位:px |
| height | Number | 否 | 0 | 掉落元素高度,单位:px |
| duration | Number | 否 | 600 | 掉落时间,单位:ms |
| jumpHeight | Number | 否 | 60 | 弹跳的高度,单位:px |
| scale | Number | 否 | 1 | 缩放值 |
| rotate | Number | 否 | 360 | 旋转度数 |
| onEnd | Function | 否 | () => {} | 动画结束回调 |
| endAnimation | Boolean | 否 | true | 是否需要收尾动画 |
| endRotate | Number | 否 | 360 | 收尾旋转角度 |
| endJumpHeight | Number | 否 | 40 | 收尾弹跳的高度,单位:px |
| endAnimationDuration | Number | 否 | 400 | 收尾动画时间,单位:ms |
cd demo
npm install
npm start
访问 http://localhost:3000 查看
FAQs
The npm package drop-animation receives a total of 10 weekly downloads. As such, drop-animation popularity was classified as not popular.
We found that drop-animation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.