我需要计算弹性项目的子项的左右边距
<div class="sec images" style="display:flex;justify-content:space-between">
<img src="images/en_mb-mega-01.png" alt="">
<img src="images/en_mb-mega-03.png" alt="">
<img src="images/en_mb-mega-04.png" alt="">
</div>
我试图循环遍历孩子,但它只给了我孩子的宽度,我需要宽度和边距
笔记
$(element).width()
没用
main.js file :
var current_item_children = current_item.children();
$.each(current_item_children, function () {
var this_item = $(this);
children.push(
{
width: this_item.width(),
outerWidth:this_item.outerWidth(false),
height: this_item.height(),
}
);
});
小唯快跑啊
温温酱
噜噜哒
相关分类