作者:翟厉害 | 来源:互联网 | 2023-05-16 03:26
Actuallythesubjectisprettyexplanatory.Buttoclarify,Iamcuriousofseveralthings:实际上这个主题很
Actually the subject is pretty explanatory. But to clarify, I am curious of several things:
实际上这个主题很有说服力。但为了澄清,我很好奇几件事:
Is there a way - not to disable - but to pause the property transition? (And then - resume it, perhaps).
有没有办法 - 不是禁用 - 而是暂停属性转换? (然后 - 也许恢复它)。
Is there a way to read property change (by Javascript) while it's in transition? For instance, will an $(el).height()
return 50 after .5 seconds after the hover event, if the styles for el are: el { height: 100px; transition: height 1s; }
and el:hover { height: 0px; }
(it's a sketch, please pardon my syntax).
有没有办法在转换过程中读取属性更改(通过Javascript)?例如,如果el的样式为:el {height:100px;那么$(el).height()将在悬停事件后0.5秒后返回50。过渡:高度1s;和el:hover {height:0px; (这是一个草图,请原谅我的语法)。
1 个解决方案