transform-origin not working in Firefox even properties in percentage value

前端 未结 3 2018
太阳男子
太阳男子 2020-12-20 02:33

CSS3 transform-origin not working in firefox browser.

I am trying to run transform: rotate(360deg); in @keyframes for &

3条回答
  •  鱼传尺愫
    2020-12-20 03:10

    You could use this function to save up some time calculating these static positions. Just pass x, y percent values, a selector and execute right in the browser console:

    ;(function getStaticCoords(x, y, elementId) {
      var coord = $(elementId)[0].getBBox()
      var coordW = coord.width * x / 100
      var coordH = coord.height * y / 100
      return coord.x + coordW + 'px ' + (coord.y + coordH / 2 + 'px')
    })(50, 50, '#myDOMElement')
    

提交回复
热议问题