How to make transition dependent on block height?

How can I implement the transition effect with a formula using js or css? I need the transition speed to depend on the height of the block. Tell me how can I implement this?
Was this page helpful?