scaleable-image
#
插件名scaleable-image
#
安装- npm
- Yarn
npm install @jswork/styled-plugin-scaleable-image
yarn add @jswork/styled-plugin-scaleable-image
#
参数名称 | 类型 | description |
---|---|---|
duration | string | 动画间隙,默认 0.3s |
value | number | 鼠标移入,scale 的倍数,默认 1.05 |
#
原理- 鼠标移入,transorm 改变 scale 的值
- 如果有多个 transform,需要自己注意冲突问题
#
用法<View plugin="scaleable-image" sub="img" wh={200} auto debug> <View as="img" className="is-scaleable" src="https://tva1.sinaimg.cn/large/007S8ZIlgy1gexw87htqhj305k05k74o.jpg" /></View>
#
演示Live Editor
Result
SyntaxError: Unexpected token (1:8) 1 : return () ^