📜  如何垂直对齐输入字段 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:44.406000             🧑  作者: Mango

代码示例1
.loginbar {
  width: 800px;
  height: 400px;
  box-sizing: border-box;
  margin: auto auto;
  display: block;
  box-shadow: 0 0 10px black;
  color: orange;
  margin-top: 200px;
  line-height: 400px;
}

header {
  width: 100%;
  height: 50px;
  text-align: center;
  background-color: #111;
  position: absolute;
  top: 0;
}

body {
  margin: 0;
  padding: 0;
}

.center {
  width: 530px;
  margin: 0 auto;
}

.input {
  font-size: 22px;
  text-align: center;
  vertical-align: middle;
}

p {
  font-size: 30px;
  color: lightblue;
  margin-top: 10px;
  font-weight: bold;
}