我有以下html5和css,我有一个用户名为&的密码类型输入。 我希望将li元素垂直显示,而不是水平显示,并让两个标签垂直对齐,而两个输入文本框也垂直对齐。使用css垂直造型列表元素
代码:
.loginform li {
background-color: purple;
display:block;
float:left;
width:300px;
heigh:150px;
padding: 5px;
}
<section class="loginform cf">
<form name="login" action="index_submit" method="get" accept-charset="utf-8">
<ul>
<li>
<label for="usermail">Email</label>
<input type="email" name="usermail" placeholder="[email protected]" required>
</li>
<li><label for="password">Password</label>
<input type="password" name="password" placeholder="password" required>
</li>
<li>
<input type="submit" value="Login">
</li
谢谢,完美。 – Harriet
@哈里特很高兴有帮助。 – George