why -webkit-transform: translate3d(0, 0, 0) messes up with fixed childs

后端 未结 2 396
不知归路
不知归路 2020-12-31 01:27

I\'ve been trying for the last few hours to figure out how come a child element was positioning against its parent and not the screenport even though it\'s positioned as \'f

2条回答
  •  生来不讨喜
    2020-12-31 02:30

    I used this "hackery"(-webkit-transform: translate3d(0, 0, 0)) to fix glitches from transform scale (some elements where moving as I was interacting with the page ) but I had an issue with position fixed on webkit(I couldn't set focus on fixed positioned text inputs) and when I removed it it was fixed.As I was using transform scale only on firefox there was no problem for me to remove it(On webkit I ended up using zoom which acts much better than transform:scale(but -webkit-transform: translate3d(0, 0, 0) was left there from legacy css) and I hope that firefox supported zoom as well)

提交回复
热议问题