How can I animate an attribute value (not style pr

2019-05-27 10:24发布

问题:

I need to animate the height attribute of iframe, but seems like the animate function accepts style properties only. Any thoughts on this?

回答1:

Iframe height attribute and CSS height attribute applied to an iframe act the same way. So just set the height in css rather than as an attribute.