Skip to content

Commit 31e45b8

Browse files
committed
Revert "修复宽屏下footer没有固定在底部的Bug"
This reverts commit 8f52f66.
1 parent c6e9394 commit 31e45b8

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

public/javascripts/main.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
$(document).ready(function () {
2-
var windowHeight = $(window).height();
32
var $backtotop = $('#backtotop');
4-
var top = windowHeight - $backtotop.height() - 200;
5-
3+
var top = $(window).height() - $backtotop.height() - 200;
64

75
function moveBacktotop() {
86
$backtotop.css({ top: top, right: 0});
97
}
108

11-
function footerFixBottom() {
12-
if($(document.body).height() < windowHeight){
13-
$("#footer").addClass('fix-bottom');
14-
}else{
15-
$("#footer").removeClass('fix-bottom');
16-
}
17-
}
18-
199
$backtotop.click(function () {
2010
$('html,body').animate({ scrollTop: 0 });
2111
return false;
@@ -30,9 +20,7 @@ $(document).ready(function () {
3020
});
3121

3222
moveBacktotop();
33-
footerFixBottom();
3423
$(window).resize(moveBacktotop);
35-
$(window).resize(footerFixBottom);
3624

3725
$('.topic_content a,.reply_content a').attr('target', '_blank');
3826

public/stylesheets/style.less

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@ body {
9898
clear: both;
9999
position: relative;
100100
background: white;
101-
&.fix-bottom{
102-
position: fixed;
103-
bottom: 0;
104-
width:100%;
105-
}
106101
}
107102

108103
#footer_main {

0 commit comments

Comments
 (0)