Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

网页去底部的问题 #35

Open
FFFcat opened this issue Aug 23, 2018 · 2 comments
Open

网页去底部的问题 #35

FFFcat opened this issue Aug 23, 2018 · 2 comments
Labels

Comments

@FFFcat
Copy link

FFFcat commented Aug 23, 2018

作者你好。
网页的底部栏颜色我觉得与背景不同,就删掉了base.html中的第139行的
div class="footer">
但随之,去底部的按钮失效了,去底部的JS代码在floatButton.js中
-- $('#goBottom').click(function(){
$('html, body').animate({scrollTop: $('.footer').offset().top}, 800); --
请问我该如何修改在删除底部栏的情况下还能使用去底部,或者有什么办法把底部栏的颜色和背景一样?

@xpleaf
Copy link
Owner

xpleaf commented Sep 3, 2018

这样子,你看我的js代码,是引用了footer这个属性的,所以去掉之后“去底部”这个js动作就执行不了,因为这时已经找不到有.footer的element了,如果你确定要删掉的话,可以在底部放一个隐藏的div,但是给该div设置一个.footer的class,就能够像原来一样正常使用去底部的功能了。

@xpleaf xpleaf added the question label Sep 3, 2018
@FFFcat
Copy link
Author

FFFcat commented Sep 25, 2018

请问具体代码是怎么样的啊?不是很懂。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants