gpt4 book ai didi

html - 溢出在 Opera 中不起作用?

转载 作者:太空宇宙 更新时间:2023-11-04 15:03:41 25 4
gpt4 key购买 nike

textarea内容超出时如何断字禁用滚动条?仅在 Opera 中存在问题。

我的 textarea 看起来像,

enter image description here

overflow:auto 属性适用于除 Opera 之外的所有浏览器。

我的 CSS 将是,

#message {
width: 99.5%;
height: 60px;
border: none;
overflow: auto;
resize: none;
outline: none;
border-color: #6495ED;
border-style: solid;
border-width: 1px;


}

如何解决这个问题。非常感谢好的答案。

最佳答案

试试这个

    {
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* css-3 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
word-break: break-all;
white-space: normal;
}

关于html - 溢出在 Opera 中不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16150491/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com