问题
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