在滚动页面时保持按钮可见


Keep a button visible while scrolling a page

在web项目的特定页面中,我想添加一个按钮,该按钮在页面上下滚动时"跟随"用户。使用CSS, php, jquery,任何我能做到的方式…问题是:我真的没有在网上找到任何关于这个的文档(可能是错误的关键字)。我在哪里可以找到一些关于它的文档?

我给你做了一个jsfiddle,我希望这是你正在寻找的: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;    
}