获取元素外边距
如果外边距margin不是在内联样式中定义的,是不能通过style获取
使用style获取的是内联样式的,可以通过getComputedStyle
去获取
链接
优秀文章:https://blog.csdn.net/meoncih_/article/details/107885494
如果外边距margin不是在内联样式中定义的,是不能通过style获取
使用style获取的是内联样式的,可以通过getComputedStyle
去获取
优秀文章:https://blog.csdn.net/meoncih_/article/details/107885494