'Scrollable' areas and 'unscrollable' areas in a website

旧街凉风 提交于 2020-02-29 07:04:07

问题


The photo (please view): Example

Hey guys, I'm new here.. I'm also new to websites designing.. Also, I know that the word "scrollable" isn't valid.

I'm creating a photo gallery and this is how it's supposed to look. There are black blocks there and basically they have a purpose. I want the menu (on the left) to always stay at its place, even when scrolling, which means that the only thing that the user will be able to do is to scroll down in the area of the photos. In my opinion, these blocks can somehow give me this option, although I'm not sure about it.. That's why I'm asking it here.

How can I turn the menu into a stable content while the area with the photos won't be like that? I'd really appreciate it if you guide me step by step (but not something that will take your time more than needed)!


回答1:


Write like this:

.menu{
 position:fixed;
 left:0;
 top:0;
}

Check this http://jsfiddle.net/ewBk4/1/

Read this http://css-tricks.com/absolute-relative-fixed-positioining-how-do-they-differ/



来源:https://stackoverflow.com/questions/11030210/scrollable-areas-and-unscrollable-areas-in-a-website

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!