滚动页面时保持按钮可见

时间:2015-05-20 11:39:36

标签: php html button scroll

在网页项目的特定页面中,我想在页面上下滚动时添加一个“跟随”用户的按钮。使用CSS,php,jquery,无论我怎么做这个... 问题是:我真的没有在网上找到任何关于此的文档(错误的关键字可能)。我在哪里可以找到有关它的文档?谢谢!

1 个答案:

答案 0 :(得分:1)

我让你成了一个小伙伴,我希望这就是你要找的东西:http://jsfiddle.net/o0me03f5/

HTML:

<div id="button">button
</div>
<div id="content">
</div>

CSS:

#content
{
    height:2000px;
}

#button
{
    background-color:gray;
    width:100px;
    height:100px;
    position:fixed;
    bottom:0;
    left:0;
    right:0;    
}