【发布时间】:2021-11-28 20:37:25
【问题描述】:
如何将图像从右侧移动到左侧?以及从左侧到右侧的表格?我还是新手,所以我不知道该怎么做。
这里是html代码。
<div class="d-lg-flex half">
<div class="bg order-1 order-md-2" style="background-image: url('images/register.svg');"></div>
<div class="contents order-2 order-md-1">
<div class="container">
<div class="row align-items-center justify-content-center">
<div class="col-md-7">
<div class="form-group first">
<label for="username">Email</label>
<input type="email" class="form-control" required>
</div>
<input type="submit" value="Login" class="btn btn-primary">
</div>
</div>
</div>
</div>
</div>
这是css。
.half, .half .container > .row {
height: 100vh;
min-height: 700px; }
@media (max-width: 991.98px) {
.half .bg {
height: 200px; } }
.half .contents {
background: #f6f7fc; }
.half .contents, .half .bg {
width: 50%; }
@media (max-width: 1199.98px) {
.half .contents, .half .bg {
width: 100%; } }
.half .contents .form-control, .half .bg .form-control {
border: none;
-webkit-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
border-radius: 4px;
height: 54px;
background: #fff; }
.half .contents .form-control:active, .half .contents .form-control:focus, .half .bg .form-control:active, .half .bg .form-control:focus {
outline: none;
-webkit-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1); }
.half .bg {
background-size: cover;
background-position: center; }
.half a {
color: #888;
text-decoration: underline; }
.half .btn {
height: 54px;
padding-left: 30px;
padding-right: 30px; }
.half .forgot-pass {
position: relative;
top: 2px;
font-size: 14px; }
请帮助我真的想将图像移到左侧,将表单移到右侧。但我不知道怎么做的。
【问题讨论】: