【发布时间】:2016-08-01 10:39:17
【问题描述】:
由于我的页脚 HTML 标记切换位置,我无法定位它。 正如您在我的 IDE 中看到的那样,我已将页脚设置在 HTML 部分的最底部。但是,一旦我运行我的应用程序,它就会向上移动 2 行来改变位置。
是不是因为remodal-pop box的配置?知道如何解决这个问题吗? 这是图片,以便更容易理解。
这是我的 css-footer 代码:
.footer {
position: absolute;
right: 0;
bottom: 0;
left: 0;
padding: 1rem;
text-align: center;
background: #2E3438;
color:white;
height: 23px;
line-height: 8px;
font-size: 13px;
}
以及由于 remodal-pop 错误而无法更改的 html 和正文:Twitter Bootstrap modal pushes html content to the left
html {
overflow: hidden;
height: 100%;
}
body {
overflow: auto;
height: 100%;
}
EDIT(在给出答案之后): 这是您需要更改的代码(追加到前面)文件的名称是 jquery.remodal.js:
if (!remodal.$overlay.length) {
remodal.$overlay = $('<div>').addClass(namespace + '-overlay');
remodal.$body.prepend(remodal.$overlay);
}
remodal.$bg = $('.' + namespace + '-bg');
remodal.$closeButton = $('<a href="#"></a>').addClass(namespace + '-close');
remodal.$wrapper = $('<div>').addClass(namespace + '-wrapper');
remodal.$modal = $modal;
remodal.$modal.addClass(namespace);
remodal.$modal.css('visibility', 'visible');
remodal.$modal.prepend(remodal.$closeButton);
remodal.$wrapper.prepend(remodal.$modal);
remodal.$body.prepend(remodal.$wrapper);
【问题讨论】:
-
如果生成了 .remodal-overlay 和 .remodal-wrapper。它们将始终出现在底部,除非您尝试在 .footer 上方创建 div 并设置 remodal-overlay 和 remodal -wrapper 仅在您制作的 div 内生成
-
从 HTML5 开始,我们使用
footer标签。我邀请你看看它。 -
@html 5 页脚与否,它再次保持不变
-
@MarkSoliver 这就是我的想法,tnx 建议 div!
-
@none 那是评论...不是答案...无论如何,您是否在其他浏览器中尝试过?