How to read/parse individual transform style values in JavaScript?

后端 未结 10 2212
鱼传尺愫
鱼传尺愫 2020-12-14 18:34

Webkit\'s blog post from last year on 3D transforms explains the various transform \'functions\' that can be used in the -webkit-transform property. For example:

<         


        
10条回答
  •  甜味超标
    2020-12-14 19:17

    I thought of one possibility. If you're prepared to parse strings in JavaScript, use

    data=document.getElementById("myDiv").getAttribute("-webkit-transform");

    then interpret data.

提交回复
热议问题