I
I
Ilya Pestov2015-11-24 11:21:59
css
Ilya Pestov, 2015-11-24 11:21:59

Bug in browsers when transform translate works?

Colleagues, I'm confused. I specify transform: translate(x,y) for ::after and on hover I change the position of the element vertically with translateY(y) . But the position also changes horizontally ( I want to say right away that if I also change with translate (x, y) then everything is fine ). I look at the inspector, the final styles are for some reason converted to transform: matrix . Can you explain this behaviour? This works exactly for pseudo-elements, an example is here .

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MK, 2015-11-24
@ilusha_sergeevich

this is not a bug, just the property is completely replaced. Those. the offset is not from the position you specify, but from the default position, and matrix is ​​displayed, perhaps because it contains almost all the transformations for the element and it is more convenient for the browser to read from it.

D
Dmitry, 2015-11-24
@soledar10

jsfiddle.net/soledar10/gkfqtmg5

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question