gpt4 book ai didi

css - 如何将按钮向左移动

转载 作者:太空宇宙 更新时间:2023-11-04 02:07:04 34 4
gpt4 key购买 nike

我正在使用 angular2dart 组件,但不知道如何移动左侧的按钮。 enter image description here

这是 html:

 <div class="forms">
<form (ngSubmit)="onSubmit()" #loginCtrl="ngForm">
<div>
<material-input type="text"
class="login"
required
floatingLabel
label="User"
[(ngModel)]="login.user"
ngControl="user"
#user="ngForm" ></material-input>
</div>
<div>
<material-input
class="login"
type="password"
floatingLabel label="Password"
[(ngModel)]="login.password">
</material-input>
</div>
<div>
<material-input
class="login"
type="text"
floatingLabel
label="Language"
[(ngModel)]="login.language">

</material-input>
</div>
<div>
<material-button raised class="btn-blue">Login</material-button>
</div>

</form>
</div>

这是CSS:

.container {
height: 100%;
padding: 0;
margin: 0;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
align-items: center;
justify-content: center;
}

.container .row {
width: auto;
height: auto;
background: #fff;
border-radius: 2px;
display: inline-block;
margin: 1rem;
position: relative;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
padding: 20px;
}

.container .row .image {
width: auto;
height: auto;
padding: 10px;
background-color: #2D3E50;
}

.container .row .forms {
width: auto;
height: auto;
margin: auto;
}

.container .row .forms .input {
width: 256px;
}

.btn-blue {
background-color: #2196F3;
color: white;
font-weight: bold;
font-size: 1.2em;
width: 280px;
margin-left: -20px;
}

material-input.login {
width: 280px;
}

最佳答案

为登录按钮添加CSS

{
width:auto;
float:left;
}

和类行到包裹在登录按钮上的 div。

关于css - 如何将按钮向左移动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40550770/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com