Jquery setting transform-origin to center

后端 未结 3 1823
臣服心动
臣服心动 2021-01-07 15:08

I\'m having troubles with setting the transform-origin of a div to the center of the site.

This is what I have so far:

var xPos = ($(window).outerWid         


        
3条回答
  •  独厮守ぢ
    2021-01-07 15:52

    The transform origin accept % or property right,center and others

    and in var xPosSTR = xPos+"px"; you have a PX. See the link: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-origin

提交回复
热议问题