html - Make text inside textarea not break to next line
问题描述
So I have a textarea and when you put too much next on one line, it overflows and goes onto the next line, without being on the next line.
This is normal but what if I want it to not go onto the next line and keep going, possibly with a scroll bar so you can scroll across to view the text
For example
text here flows onto
the next line
I want it to be
text here doesnt flow onto the next line, but might not be visible without scrolling
In a textarea
Is this possible? I've tried overflow-x but that doesn't seem to be working
解决方案
将white-space: nowrap;
CSS 属性与overflow
https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
推荐阅读
- python - 注释非可执行代码的 Python 最佳实践
- npm - 智能合约构造函数中的解析错误
- sql - 具有多对多关系和左连接的 JPQL 查询
- python - 如何在 python 中使用二进制 netcdf 掩码?
- javascript - 如何测试 FileReader 以使用 Jest 读取 json 文件?
- python - 通过多处理库调用时获取函数的返回值(字符串)而不修改
- android - AAPT:错误:意外元素
在发现 - javascript - 如何在不关闭浏览器的情况下在 Cypress 中运行多个测试?
- sql - 如何在 Oracle SQL 中用逗号分隔值替换
- python - Django Html 从索引中获取字典值