html – 全宽透明Textarea输入

html – 全宽透明Textarea输入,第1张

概述我正在尝试使用 HTML5和CSS制作笔记应用程序.在尝试从用户那里获取输入时,我希望textarea是全宽(100%)并且是透明的. 所以,基本上,文本区域应该是透明的,页面应该只显示一个白色光标,并且应该没有溢出. 如果有人可以指示我保存并清除笔记,那也会很棒. 根据您发布的图像,将textarea包装在容器内. html,body { height: 100%; padding: 我正在尝试使用 HTML5和CSS制作笔记应用程序.在尝试从用户那里获取输入时,我希望textarea是全宽(100%)并且是透明的.

所以,基本上,文本区域应该是透明的,页面应该只显示一个白色光标,并且应该没有溢出.

如果有人可以指示我保存并清除笔记,那也会很棒.

解决方法 根据您发布的图像,将textarea包装在容器内.

HTML,body {  height: 100%;  padding: 0;  margin: 0;  overflow-x: hIDden;}.text-container {  background: #4492E0;  padding: 20px;  height: 100%;  position: relative;}textarea {  background: transparent;  color: white;  resize: none;  border: 0 none;  wIDth: 100%;  Font-size: 5em;  outline: none;  height: 100%;  position: absolute;}
<div >  <textarea>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,when an unkNown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centurIEs,but also the leap into electronic typesetting,remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters,as opposed to using 'Content here,content here',making it look like readable English. Many desktop publishing packages and web page editors Now use Lorem Ipsum as their default model text,and a search for 'lorem ipsum' will uncover many web sites still in their infancy. VarIoUs versions have evolved over the years,sometimes by accIDent,sometimes on purpose (injected humour and the like).    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,sometimes on purpose (injected humour and the like).</textarea></div>
总结

以上是内存溢出为你收集整理的html – 全宽透明Textarea输入全部内容,希望文章能够帮你解决html – 全宽透明Textarea输入所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1087963.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存