网站中的“可滚动”区域和“不可滚动”区域 [英] 'Scrollable' areas and 'unscrollable' areas in a website

查看:93
本文介绍了网站中的“可滚动”区域和“不可滚动”区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

照片(请查看):示例



嘿,伙计们,我是新来的......我也是新来的网站设计..
另外,我知道单词可滚动是无效的。



我正在创建一个照片库,这就是它应该看起来的样子。那里有黑色的街区,基本上他们有目的。我希望菜单(左侧)始终保持在原来的位置,即使在滚动时也是如此,这意味着用户可以做的唯一事情就是在照片区域向下滚动。
在我看来,这些块可以以某种方式给我这个选项,但我不确定它。这就是为什么我在这里要求它。



如何将菜单变成稳定的内容,而带照片的区域不会像这样?我真的很感激你,如果你引导我一步一步的(但不会让你的时间超过需要的东西)! 解决方案

这样写:

  .menu {
position:fixed;
剩下:0;
top:0;
}

检查 http://jsfiddle.net/ewBk4/1/

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


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)!

解决方案

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/

这篇关于网站中的“可滚动”区域和“不可滚动”区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆