Skip to main content

scaleable-image

插件名#

scaleable-image

安装#

npm install @jswork/styled-plugin-scaleable-image

参数#

名称类型description
durationstring动画间隙,默认 0.3s
valuenumber鼠标移入,scale 的倍数,默认 1.05

原理#

  1. 鼠标移入,transorm 改变 scale 的值
  2. 如果有多个 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 ()
            ^