html – 只滚动内容div,其他应该是固定的

html – 只滚动内容div,其他应该是固定的,第1张

概述我有三个div我需要标题和left_side div来修复和内容div滚动.我一直在寻找解决方案,发现有溢出和位置的东西.但我不能使用它的核心.我该怎么做?我会感谢各种答案.    HTML------<div id="header"></div><div id="left_side"> </div><div id="content"></divCSS----- 我有三个div我需要标题和left_sIDe div来修复和内容div滚动.我一直在寻找解决方案,发现有溢出和位置的东西.但我不能使用它的核心.我该怎么做?我会感谢各种答案.
HTML------<div ID="header"></div><div ID="left_sIDe">    </div><div ID="content"></divCSS-----body {       wIDth: 100%;    height: auto;    padding: 0;    margin: 0px auto;    Font-family: Calibri,Georgia,Ubuntu-C;      Font-size: 16px;    margin-bottom: 20PX}#header{    wIDth: 100%;    height: 139px;    background-image: url('images/header_grey.gif');   }#left_sIDe{    wIDth: 210px;    height: 700px;    background-image: url('images/left_sIDe.gif');    background-repeat:repeat-y;    overflow:hidden;     position:absolute;    Font-size: 16px;}#content{     height: auto;     padding: 20px;     margin-left: 230px;     margin-right: 20px;    padding-bottom: 30px }
解决方法 溢出:自动;需要时添加滚动条
#header{    wIDth: 100%;    height: 139px;    background-image: url('images/header_grey.gif');       overflow: hIDden;  //code added to prevent scroll}#left_sIDe{    wIDth: 210px;    height: 700px;    background-image: url('images/left_sIDe.gif');    background-repeat:repeat-y;    overflow:hidden;  //code added to prevent scroll    position:absolute;    Font-size: 16px;}#content{     height: auto;     padding: 20px;     margin-left: 230px;     margin-right: 20px;    padding-bottom: 30px;    overflow: auto;  //code added }
总结

以上是内存溢出为你收集整理的html – 只滚动内容div,其他应该是固定的全部内容,希望文章能够帮你解决html – 只滚动内容div,其他应该是固定的所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1144126.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-31
下一篇2022-05-31

发表评论

登录后才能评论

评论列表(0条)

    保存