html 输入一个在另一个下面

html input one below the other

我在尝试输入这两个输入时遇到了这个问题,我无法简单地找到使一个输入低于另一个输入的方法... 我的意思是这样

代码在这里

* {
  text-decoration transition: all 0.2s;
  padding: 0;
  margin: 0;
  font-family: "Open Sans";
}
body {
  display: flex;
  height: 100vh;
  background: #e5e5e5;
}
.wrapper {
  margin: auto;
  background: #fff;
  display: flex;
  flex-direction: column;
  width: 440px;
  text-align: center;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}
.header {
  padding: 50px 50px 100px 50px;
  min-height: 150px;
  background: url("https://cdn0.iconfinder.com/data/icons/elpis/144/Newsletter-128.png") no-repeat center 130px;
}
.header h1 {
  color: #536a89;
  text-transform: uppercase;
  font-size: 30px;
  letter-spacing: 4px;
}
.header p {
  font-size: 13px;
  color: rgba(92, 118, 152, 0.8);
}
.footer {
  display: flex;
  justify-content: space-between;
}
.footer form {
  flex-grow: 1;
  display: flex;
}
.footer input {
  background: #e0e5ec;
  border: none;
  padding: 20px 25px;
  flex-grow: 2;
  display: block;
  color: #5c7698;
  border-radius: 3px;
}
.footer input::-webkit-input-placeholder {
  color: rgba(92, 118, 152, 0.7);
}
.footer input:focus {
  outline: none;
}
.footer .btn-submit {
  background: #c6cfdc;
  border: none;
  padding: 20px;
  flex-grow: 1;
  color: #5c7698;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
}
.footer .btn-submit:focus {
  outline: none;
}
<body>
  <div class="wrapper">
    <div class="header">
      <h1>Subscribe</h1>
      <p>coming soon to your inbox</p>
    </div>
    <div class="footer">
      <form action="">
        <input class="nameaki" type="text" placeholder="Enter your name here" />
        <input type="email" class="emailaki" placeholder="Enter your email here" />
      </form>
      <span class="btn-submit" onclick="newsletter.submit()">Εγγραφή</span>
    </div>
  </div>
</body>

flex-direction: column; 添加到您的 footerform 中,如您所愿,它们一个在另一个下面。

.footer {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}
.footer form {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

如果这看起来不错,请告诉我。谢谢!

* {
  text-decoration transition: all 0.2s;
  padding: 0;
  margin: 0;
  font-family: "Open Sans";
}
body {
  display: flex;
  height: 100vh;
  background: #e5e5e5;
}
.wrapper {
  margin: auto;
  background: #fff;
  display: flex;
  flex-direction: column;
  width: 440px;
  text-align: center;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}
.header {
  padding: 50px 50px 100px 50px;
  min-height: 150px;
  background: url("https://cdn0.iconfinder.com/data/icons/elpis/144/Newsletter-128.png") no-repeat center 130px;
}
.header h1 {
  color: #536a89;
  text-transform: uppercase;
  font-size: 30px;
  letter-spacing: 4px;
}
.header p {
  font-size: 13px;
  color: rgba(92, 118, 152, 0.8);
}
.footer {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}
.footer form {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.footer input {
  background: #e0e5ec;
  border: none;
  padding: 20px 25px;
  flex-grow: 2;
  display: block;
  color: #5c7698;
  border-radius: 3px;
}
.footer input::-webkit-input-placeholder {
  color: rgba(92, 118, 152, 0.7);
}
.footer input:focus {
  outline: none;
}
.footer .btn-submit {
  background: #c6cfdc;
  border: none;
  padding: 20px;
  flex-grow: 1;
  color: #5c7698;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
}
.footer .btn-submit:focus {
  outline: none;
}
<body>
  <div class="wrapper">
    <div class="header">
      <h1>Subscribe</h1>
      <p>coming soon to your inbox</p>
    </div>
    <div class="footer">
      <form action="">
        <input class="nameaki" type="text" placeholder="Enter your name here" />
        <input type="email" class="emailaki" placeholder="Enter your email here" />
      </form>
      <span class="btn-submit" onclick="newsletter.submit()">Εγγραφή</span>

    </div>
  </div>
</body>