textarea文本居中的问题

发布时间 2023-12-08 10:21:29作者: 爱跳舞的程序员

核心:

水杯居中用
text-align: center;
垂直居中用 (其中数字30相同就行不一定是30)
         height: 30px;
         line-height: 30px;

更多学习,可参考 https://www.python100.com/html/57600.html

个人实战案例

.myTextArea {
    border: 0px solid;
    overflow: auto;
    background: #f6f6f6;
    width: 100%;
    /* height: 100%; */
    height: 30px;
    line-height: 30px;
    padding: 0px;
/*     text-align: left;
    vertical-align: top; */
 /*  display: flex;
  justify-content: center; 
  align-items: center;
  vertical-align:center; */
  text-align: center;
}