vue项目中当网站内容不足一屏时footer如何紧贴底部
created () {//this.footerAuto();$(function() {footerAuto();})function footerAuto() {var _wh = $(window).height();var _dh = $(document).height...
·
created () { // this.footerAuto(); $(function() { footerAuto(); }) function footerAuto() { var _wh = $(window).height(); var _dh = $(document).height(); var _bh = $(document.body).height(); if (_bh < _wh) { $(".footer").css({ position: "fixed", bottom: "0", left: "0", }) } else { $(".footer").css({ position: "static", bottom: "auto", left: "auto", }) } } }
更多推荐
已为社区贡献11条内容
所有评论(0)