【发布时间】:2020-12-05 04:05:59
【问题描述】:
我想实现这一点。这是一个点击弹出窗口。
到目前为止,这就是我所做的。
如您所见,它占用了所有页面,我不知道为什么,并且无法将标签与复选框对齐,因为标签出现在复选框下方,我无法移动它们。我真的很想提出一些建议,这个想法是使用引导程序。我尝试阅读一些文档,但由于我刚刚开始,我真的很难理解所有内容。
CSS:
body{
padding:0;
margin:0;
}
.signupContainer{
height:100%;
position:absolute;
overflow:hidden;
background-color: white;
box-shadow: 15px 9px 26px rgba(0, 0, 0, 0.2);
border-radius: 20px;
margin: 0 auto;
}
.box{
position:absolute;
height:100%;
width:50%;
margin-top: 55px;
font-family: 'Poppins', sans-serif;
padding-bottom: 140px;
}
.box h1{
text-align:center;
margin: 0 auto;
font-size:30px;
margin-bottom: 20px;
}
.box input{
font-family: 'Poppins', sans-serif;
display:block;
width:300px;
margin:0px auto;
padding:5px;
text-align: center;
background: #F8F8F8;
color:#fff;
border:0;
border-radius: 20px;
margin-bottom: 20px
}
.box input:focus,.box input:active,.box button:focus,.box button:active{
outline:none;
}
.box label {
font-family: 'Poppins', sans-serif;
}
.box button{
background: #FE6047;
border:0;
color:#fff;
padding:5px;
font-size:20px;
width:300px;
margin:20px auto;
display:block;
cursor:pointer;
border-radius: 20px;
}
.box button:active{
background:#27ae60;
}
.box p{
font-size:14px;
text-align:center;
}
.box p span{
cursor:pointer;
color:#666;
}
input[type=checkbox] {
margin: 2px 0 0;
align-self: flex-start;
}
HTML:
<div class="signupContainer col-6">
<div class="box col-12">
<h1 class="col">Sign up</h1>
<input type="text" class="col" placeholder="Usuario"/>
<input type="email" class="col" placeholder="Email"/>
<input type="text" class="col" placeholder="Pais"/>
<input type="password" class="col" placeholder="Contraseña"/>
<input type="password" class="col" placeholder="Repite contraseña"/>
<label for="seller" class="checkbox-inline"><input type="checkbox" id="seller" >Vendedor</label>
<label for="buyer" class="checkbox-inline"><input type="checkbox" id="buyer" > Comprador</label>
<button class="col">Sign</button>
</div>
</div>
谢谢!
【问题讨论】:
标签: html css web bootstrap-4 responsive-design