0

有人可以告诉我如何在其中制作我的内容

`#content-text`

当内容不适合时显示 y 轴滚动。目前它遵循 body 元素中的隐藏标签。谢谢!

body,html{
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    padding: 0;
    margin: 0;
    border: 0;
    z-index: 100;
    font-size: 100%;
}

#content-bg {

    padding: 2em;
    background-color: #362720;
    position: absolute;
    width: 33%;
    right: 3.3%;
    bottom: 6.4em;
    cursor: default;
    opacity: .7;
    z-index: 3;
    min-height: 20%;
    overflow:auto !important;
    overflow-style:auto !important;

}

#content-text {

    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.7em;
    color: #FFF;
    z-index: 4;
    font-weight: lighter;
    overflow:auto !important;
    overflow-style:auto !important;
}
4

2 回答 2

0

将高度或最大高度值设置为#content-text,然后设置

overflow-y:auto; overflow-x:hidden;
于 2013-02-26T14:12:16.860 回答
0
#content-bg {
    padding: 2em;
    background-color: #362720;
    position: absolute;
    width: 33%;
    right: 3.3%;
    bottom: 6.4em;
    cursor: default;
    opacity: .7;
    z-index: 3;
    min-height: 20%;
    overflow-y:auto;
    overflow-x:hidden
}
于 2013-02-26T14:13:16.017 回答