全宽透明Textarea输入

Dvo*_*rak 5 html css html5 css3

我正在尝试使用HTML5和CSS制作笔记应用程序.在尝试从用户那里获取输入时,我希望textarea是全宽(100%)并且是透明的.

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

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

Man*_*mar 7

根据您发布的图像,将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;
}
Run Code Online (Sandbox Code Playgroud)
<div class="text-container">
  <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, 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).</textarea>
</div>
Run Code Online (Sandbox Code Playgroud)