Div 100%高度滚动 [英] Div 100% height scroll

查看:159
本文介绍了Div 100%高度滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网页上,我有一个左侧的导航栏,100%的高度和25%的宽度。
它工作正常,但是当有滚动可用,它破坏背景,并使它看起来丑陋。我认为的原因是100%的高度只适用于活动窗口。
即使用户正在滚动,总是具有div 100%高度的诀窍是什么?

At my page i have a navigation bar to the left that is 100% height and 25% width. It is working fine, but when there's scroll available, it destroys the background, and make it look ugly. The reason i think is that 100% height is only applied to the active window. What is the trick to have a div 100% height always, even if the user is scrolling?

导航的Css:

    width:25%;
    height:100%;
    float:left;
    color:#999999;

我试过位置:绝对没有结果,也尝试清除两者。
需要帮助:)

I have tried position:absolute with no results, also tried clear both. Need help :)

小提琴

推荐答案

使用 min-height:100% 100%应该修复它。在这里查看更新版本: http://jsfiddle.net/zitrusfrisch/Sa6cb/3/

这篇关于Div 100%高度滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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