R
R
redd_i2017-05-26 22:18:10
Programming
redd_i, 2017-05-26 22:18:10

How to slow down transform?

Hello. I need to make it go up when hovering over an element. I did so

.v:hover {
    transform: translate3d(0, -14px, 0);
    transition: 0.3s;
}

When hovering, everything is as it should be. But it goes down very quickly. Please tell me how to make it so that when the cursor leaves the element - it still slowly fell. Thanks in advance

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
Mercury13, 2018-08-31
@Mercury13

If N=20, X=3, Y=5, then our output is 8.
3, 5, 6, 9, 10, 12, 15, 18.
The frontal solution is to pass [2, N) and recalculate the required numbers.
Smart solution idea. If X and Y are guaranteed to be prime, then these same numbers are repeated in increments of X·Y.
3, 5, 6, 9, 10, 12, 15
18, 20, 21, 24, 25, 27, 30
And then think for yourself.

A
Andrey, 2018-08-31
@VladimirAndreev

$a = min([$x, $y]);
echo floor($n/$a)

R
Rsa97, 2018-08-31
@Rsa97

No need. We need to find the number of multiples of X, add the number of multiples of Y, and subtract the number of multiples of X*Y. The problem is solved without cycles, with one formula.
N=20, X=3, Y=5
⌊19/3⌋ + ⌊19/5⌋ - ⌊19/15⌋ = 6 + 3 - 1 = 8

A
Artur Karapetyan, 2017-05-26
@redd_i

transition: transform 0.3s

F
Froggyweb, 2017-05-26
@Froggyweb

put transiton not on the state, but on the element

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question