小编use*_*365的帖子

子div的宽度大于父div

我需要我的孩子div遵守父div的底部,因此position: absolutebottom: 0px。我还需要孩子的宽度与父母的宽度相同,我认为box-sizing: border-box可以工作,但是由于填充和边距,孩子的宽度仍向右突出。

我该如何解决?

.parent {
  height: 500px;
  min-width: 500px;
  position: relative;
  background-color: red;
}

.child {
  padding: 10px 10px 10px 10px;
  margin: 10px 10px;
  background-color: grey;
  bottom: 0px;
  box-sizing: border-box;
  position: absolute;
  width: 100%;
}
Run Code Online (Sandbox Code Playgroud)
<div class="parent">
  <div class="child"></div>
</div>
Run Code Online (Sandbox Code Playgroud)

在JSFiddle上查看

html css

3
推荐指数
1
解决办法
4060
查看次数

HTML表单不在Express中发送数据

我在HTML中有以下表格:

    <form method="post" id="registration-form" action="/register"> 
      <div class="form-group">
        <label for="UsernameRegistration">Username:</label>
        <input type="text" class="form-control" id="UsernameRegistration">
      </div>
      <div class="form-group">
        <label for="PasswordRegistration">Password:</label>
        <input type="password" class="form-control" id="PasswordRegistration">
      </div>
      <div class="form-group">
        <label for="ConfirmPasswordRegistration">Confirm Password:</label>
        <input type="password" class="form-control" id="ConfirmPasswordRegistration">
      </div>
      <input type="submit" class="form-control" />
    </form>
Run Code Online (Sandbox Code Playgroud)

/register端点如下所示:

router.post('/register', function(req, res, next) {
  console.log(req);
});
Run Code Online (Sandbox Code Playgroud)

在req.query和req.body中,没有数据.我究竟做错了什么?

html node.js express

0
推荐指数
1
解决办法
1581
查看次数

标签 统计

html ×2

css ×1

express ×1

node.js ×1