【问题标题】:Overflow doesn't work in Opera 28溢出在 Opera 28 中不起作用
【发布时间】:2015-04-20 12:27:19
【问题描述】:

有谁知道为什么 Opera 不使用overflow:hidden

左边是Opera,右边是Firefox

CSS:

#ChatBig {
    width: 60%;
    height: 600px;
    margin: auto;
    background-color: white;
    overflow:hidden;
    resize:none;
    position: relative;
    border: 1px solid #000;
}
#ChatMessages{
    width: 100%;
    min-height: 498px;
    font-size: 16px;
    font-weight: normal;
    overflow:hidden;
    resize:none;
    position: absolute;
    bottom: 50px;
    margin-bottom: 10px;
}
#ChatText{
    width: 100%;
    height: 50px;
    border: 1px solid #000;
    overflow:hidden;
    resize:none;
    position: absolute;
    bottom: 0;
}

【问题讨论】:

  • Opera 9 和 10 需要前缀版本 -o-text-overflow
  • 不,抱歉没有解决
  • 我什至不能做 -o-text-overflow:hidden;给我和错误.. 隐藏的无效 css 值
  • 这不是一个完整的例子,但我很好奇,它在 Chrome 41 中是否正常工作?
  • 我不知道你的 HTML 是什么样的,但如果它有点像this,它在 Opera 28 中可以正常工作。

标签: css overflow opera opera-blink


【解决方案1】:

试试这个:

#ChatBig {
    width: 60%;
    height: 600px;
    margin: auto;
    background-color: white;
    overflow:hidden;
    resize:none;
    position: relative;
    border: 1px solid #000;
}
#ChatMessages{
    width: 100%;
    min-height: 498px;
    font-size: 16px;
    font-weight: normal;
    overflow:hidden;
    resize:none;
    position: absolute;
    bottom: 50px;
    margin-bottom: 10px;
}
#ChatText{
    width: 100%;
    height: 50px;
    border: 1px solid #000;
    overflow:hidden;
    resize:none;
    position: absolute;
    bottom: 0;
}
<div id="ChatBig">
    <div id="ChatMessage">
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        A line of chat<br/>
        ...
    </div>
    <textarea id="ChatText">
    </textarea>
</div>

【讨论】:

    猜你喜欢
    • 2016-01-19
    • 2012-12-02
    • 1970-01-01
    • 1970-01-01
    • 2013-08-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多