css让div有边距,但不影响元素位置

.login_form

{

  position:absolute;

  bottom:0;

  100%;

  padding:0 20px;

  box-sizing:border-box;

}

主要是:box-sizing:border-box;这行代码实现的逻辑

让上面的那个父div里面的控件居右的方法

.btns{

  display:flex;

  justify-content:flex-end;

}

原文地址:https://www.cnblogs.com/wjx-blog/p/15573817.html