其他分享
首页 > 其他分享> > js 动态获取高度 设置距离

js 动态获取高度 设置距离

作者:互联网

var boxs = document.getElementById('m2-head');
var Height = boxs.clientHeight||o.offsetHeight;
console.log(Height)
$(".swiper-container").css({"margin-top":Height + "px"});

标签:console,log,offsetHeight,js,Height,获取,var,动态,boxs
来源: https://www.cnblogs.com/guangzhou11/p/12067815.html