调整页脚
This commit is contained in:
parent
c64e62749b
commit
9bcf043027
@ -1,4 +1,4 @@
|
||||
<div class="layui-footer" style="border-top: 1px #e6e6e6 solid;text-align:center;margin-top:20px;width:100%;">
|
||||
<div class="layui-footer" style="border-top: 1px #e6e6e6 solid;text-align:center;margin-top:10px;width:100%;">
|
||||
<div style="margin-top:10px;">
|
||||
© <a href="/">MrDoc 2019-2020</a> |
|
||||
<span class="layui-hide-xs">基于<a href="https://www.djangoproject.com/" target="_blank">Django</a> | </span>
|
||||
|
||||
@ -248,13 +248,13 @@
|
||||
/*
|
||||
scrollTop() 设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
|
||||
*/
|
||||
footerTop = ($(window).scrollTop() + $(window).height() - footerHeight - 40)+"px";
|
||||
footerTop = ($(window).scrollTop() + $(window).height() - footerHeight - 35)+"px";
|
||||
// console.log("页脚高度:",footerHeight)
|
||||
// console.log(footerTop)
|
||||
// console.log($(".layui-header").height()+$(".layui-container").height())
|
||||
// console.log("窗口高度:",$(window).height())
|
||||
//如果页面内容高度小于屏幕高度,div#footer将绝对定位到屏幕底部,否则div#footer保留它的正常静态定位
|
||||
if(($(".layui-header").height() + $(".index-control").height() + $(".project-list-content").height() + $(".project-list-page").height() + 15) < $(window).height()) {
|
||||
if(($(".layui-header").height() + $(".index-control").height() + $(".project-list-content").height() + $(".project-list-page").height() + 16) < $(window).height()) {
|
||||
console.log("页脚置底")
|
||||
$(".layui-footer").css({ position: "absolute",left:"0" }).stop().css({top:footerTop});
|
||||
}else{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user