【发布时间】:2016-06-01 01:36:36
【问题描述】:
好的,所以我一直在制作一个网站,我遇到的一个问题是内部 div #content 没有扩展到页面的完整大小,让文本以一种草率的方式流动,导致很难阅读背景图像。 我用溢出:自动;解决我的问题,但现在页面上出现了我不想要的滚动条。 下面是管理 body、html 和 #content 元素的 CSS 部分(#content 是一个 div)。
body, html {
height: 100%;
font-family: Helvetica, Arial, sans-serif;
}
body {
background-color: black;
color: white;
background: url('c12background.jpg');
}
#content {
height: 100%;
width: 80%;
margin: auto;
padding: 5px 5px 5px 5px;
background-color: black;
overflow: auto;
}
【问题讨论】: