有的时候可能会有这样的需求,一个竖直的输入框,输入信息,文字也是从上到下排列;

(但是在移动端或用轮播swiper时不起作用,可以用textarea代替input)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.abc{
width: 50px;
height: 400px;
border: 2px solid red;
box-sizing: border-box;
padding: 10px;
font-size: 30px;
-webkit-user-select:text;
}
</style>
</head>
<body>
<div class="abc" contenteditable=true>请输入你的名字</div>
</body>
</html>

 

相关文章:

  • 2022-01-06
  • 2021-10-22
  • 2021-10-30
  • 2021-12-20
  • 2021-11-24
  • 2022-12-23
  • 2021-09-22
猜你喜欢
  • 2022-12-23
  • 2021-07-10
  • 2021-10-21
  • 2022-12-23
  • 2021-12-25
  • 2021-06-05
  • 2021-12-12
相关资源
相似解决方案