button-animation
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -1,2 +0,2 @@ | ||
export function buttonAnimation (e) { | ||
export function buttonAnimation (e,color='#fff') { | ||
const style = document.createElement('style') | ||
@@ -7,3 +7,3 @@ style.innerHTML = '.buttonAnimation {' + | ||
' width: 400px;' + | ||
' background: #fff;' + | ||
` background:${color};` + | ||
' top: 0;' + | ||
@@ -10,0 +10,0 @@ ' left: 0;' + |
{ | ||
"name": "button-animation", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "一个b站上学习到的按钮点击动画", | ||
@@ -5,0 +5,0 @@ "main": "btnAnimation.js", |
@@ -27,2 +27,12 @@ # 演示效果 | ||
4.波纹颜色默认为#333,接收第二个参数修改波纹颜色 | ||
```js | ||
clickBtn(e) { | ||
buttonAnimation(e, 'red') | ||
//buttonAnimation(e,'#4e94fd'); | ||
//buttonAnimation(e,'linear-gradient(90deg, #025ce3, #4e94fd)'); | ||
}, | ||
``` | ||
# 示例 demo | ||
@@ -29,0 +39,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3282
93