javascript - Why does the transform in the object printed by element.style have a value, but the printed transform has no value?
phpcn_u1582
phpcn_u1582 2017-06-06 09:52:54
0
1
700

Code:

Output result:

Why is it normal to print out the transform attribute value in obj (as shown below)

The value of Console.log in the second line is 0px 0px 0px?

Already tried the answer from a friend

console.log(window.getComputedStyle(this.$children[6].$el)['transform'])

But the printed value is matrix[1,0,0,1,0,0], which is not the answer I want.

phpcn_u1582
phpcn_u1582

reply all(1)
曾经蜡笔没有小新

el.style object should be used to set styles on specific elements. Use the getComputedStyle method to get the style attribute value.

For example:

getComputedStyle(document.querySelector('.model'))['transform']
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template