开发者

Best practices for a stationary frame at the top of an ASP.NET page?

Wh开发者_StackOverflow中文版at is the best practice for creating a hovering "frame" in ASP.NET which will remain stationary at the top of a web page regardless of how the user scrolls vertically?

For example, if I create a textbox to contain search criteria, I might want the area of that textbox to remain stationary at the top of the browser window, allowing the user to scroll among the results freely and if they wish update their search criteria.


Here is a working example: http://jsfiddle.net/srPPu/2/ (edit: better link)

Using css create an element thats position is fixed on the top of the page (meaning it will not scroll

#search{
    position:fixed;
    width:100%;
    height:25px;
    background:#eeeeee;
    clear:both;
}
#content{
    padding-top:20px;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜