简体   繁体   English

使用jQuery重置CSS3转换?

[英]Reset CSS3 transforms with jQuery?

I need to set a css3 transform:scale() back to it's original value. 我需要将css3 transform:scale()设置回其原始值。

See this example: 请参阅以下示例:

http://jsfiddle.net/Z2TNw/ http://jsfiddle.net/Z2TNw/

It works on click, but not when I hover out.. 它可以在点击时起作用,但在我悬停时不起作用。

I also tried setting to scale(1) but that doesn't help either.. 我也尝试设置为scale(1),但这也无济于事。

Any ideas? 有任何想法吗?

In your second hover callback, you are still using inValue . 在第二个悬停回调中,您仍在使用inValue If you switch it to use outValue , like this updated fiddle: http://jsfiddle.net/Z2TNw/1/ It works as expected. 如果将其切换为使用outValue ,例如更新的小提琴: http : //jsfiddle.net/Z2TNw/1/它将按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM