图片炫酷效果html,HTML5和CSS3炫酷图片运动模糊和倾斜特效

Options

A normal image is replaced with layers of semi-transparent divisions of the same image. Each layer gets moved in 3D, creating a subtle illusion of perspective.

extraImgs

Number of extra background-image divisions; min:1, max:5

extraImgs : 2

opacity

The opacity value for the background-image divisions

opacity : 0.7

bgfixed

Movement of first layer; by default it's not moving

bgfixed : true

movement

The movemement configuration for each background-image division

movement : { ... }

perspective

The perspective value for the 3D transforms

perspective : 1000

translateX

The relative movement on the x-axis. A positive value will move the background-image divisions in the same direction like the mouse up to the amount defined (in pixel). A negative value reverses the direction, i.e. moves the division into the opposite direction of the mouse.

translateX : -10

translateY

The relative movement on the y-axis.

translateY : -10

translateZ

The relative movement on the z-axis. This specific translation is done when the mouse moves vertically. A perspective value needs to be set.

translateZ : 20

rotateX

The relative rotation on the y-axis. A perspective value needs to be set.

rotateX : 2

rotateY

The relative rotation on the y-axis. A perspective value needs to be set.

rotateY : 2

rotateZ

The relative rotation on the Z-axis. A perspective value needs to be set.

rotateZ : 0

Add the class "tilt-effect" to the respective image. The image container should have an explicit width and height.

To initialize either set the options in "data-tilt-options" or initialize with JavaScript: new TiltFx(element, options)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值