简体   繁体   English

在 SharePoint 使用应用程序定制器的现代页面布局中,自定义页脚消失了

[英]In SharePoint Modern Page Layout using Application Customizer, custom footer gets disappeared

In SharePoint Modern Page Layout using Application Customizer, the middle/main content height was too small for the view-port, so tried to increase the middle/main content height through CSS, by doing so custom footer is getting disappeared.在 SharePoint 使用 Application Customizer 的现代页面布局中,中间/主要内容高度对于视口来说太小了,因此尝试通过 CSS 增加中间/主要内容高度,这样做自定义页脚正在消失。 Refer here for SharePoint Modern Page请参阅此处了解 SharePoint 现代页面

Could anyone advice how to achieve it.任何人都可以建议如何实现它。 Thanks in advance.提前致谢。

You could try to add ' position:fixed;您可以尝试添加' position:fixed; 'to bottom css. '到底部 css。

After you add this, you would need adjust other elements' CSS accordingly.添加后,您需要相应地调整其他元素的 CSS。

My test css:我的测试 css:

position:fixed;
right:10px;
bottom:10px;

在此处输入图像描述

Updated:更新:

Firstly, add display:none to bottom div css.首先,将 display:none 添加到底部 div css。

Secondly, add a script in code, determine the position of the scroll bar according to the scroll event of the div.其次,在代码中添加脚本,根据div的滚动事件确定滚动条的position。 When the scroll bar reaches the bottom, show bottom div.当滚动条到达底部时,显示底部 div。

Sample(you need to change the class):示例(您需要更改类):

$(function(){

          var nScrollHight = 0; 
          var nScrollTop = 0;   
          var nDivHight = $(".scrollRegion_dfa95bf5").height();
          $(".scrollRegion_dfa95bf5").scroll(function(){
            nScrollHight = $(this)[0].scrollHeight;
            nScrollTop = $(this)[0].scrollTop;
        var paddingBottom = parseInt( $(this).css('padding-bottom') ),paddingTop = parseInt( $(this).css('padding-top') );
            if(nScrollTop + paddingBottom + paddingTop + nDivHight >= nScrollHight){

              $("div[class^='bottom']").show()
            }else{
              $("div[class^='bottom'").hide()
            }

            });
        })

Test result:测试结果:

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM