
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
button-animation
Advanced tools
1.install
npm i -s button-animation
2.import
import { buttonAnimation } from "button-animation";
3.绑定点击事件,需要传入 event
clickBtn(e) {
buttonAnimation(e);
},
<template>
<article class="buttons">
<button @click="clickBtn">Button</button>
<button @click="clickBtn">Button</button>
</article>
</template>
<script>
import { buttonAnimation } from "button-animation";
export default {
methods: {
clickBtn(e) {
buttonAnimation(e);
},
},
};
</script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
margin: 0;
background-color: #350048;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
button {
border: none;
outline: none;
color: #fff;
border-radius: 45px;
margin: 0 15px;
padding: 14px 40px;
font-size: 30px;
font-weight: 400;
background: linear-gradient(90deg, #6616d0, #ac34e7);
box-shadow: 3px 5px rgba(0, 0, 0, 0.1);
border-top: 1px solid rgba(0, 0, 0, 1);
}
button:nth-child(2) {
background: linear-gradient(90deg, #025ce3, #4e94fd);
}
</style>
注意 button 的 css 会被设置为 position:relative;overflow:hidden;
FAQs
b站上学习到的按钮点击动画
The npm package button-animation receives a total of 1 weekly downloads. As such, button-animation popularity was classified as not popular.
We found that button-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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.