Answer the question
In order to leave comments, you need to log in
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
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question