我有这个表格:
<div class="jumbotron" id="jumbotron-6" align="center">
<form action="login.php" method="POST">
<input type="text" placeholder="Enter your email" name="email">
<input type="password" placeholder="and password" name="password">
<input type="submit">
</form>
</div> 我正在尝试将这个CSS应用于它:
input [type="text"], input [type="password"] {
outline: none;
padding: 10px;
display: block;
width: 300px;
border-radius: 3px;
border:1px solid #eee;
margin:20px auto;
}但它并不适用。我有我的css链接到页面也。
发布于 2016-07-16 04:12:37
去掉空格以便输入...
input[type="text"], input[type="password"] {
outline: none;
padding: 10px;
display: block;
width: 300px;
border-radius: 3px;
border:1px solid #eee;
margin:20px auto;
}<div class="jumbotron" id="jumbotron-6" align="center">
<form action="login.php" method="POST">
<input type="text" placeholder="Enter your email" name="email">
<input type="password" placeholder="and password" name="password">
<input type="submit">
</form>
</div>
发布于 2016-07-16 04:12:06
input [type="text"], input [type="password"] {
这将选择输入元素中具有文本或密码类型的元素(在HTML中是不可能的)-您需要删除空格,以选择其本身属于文本或密码类型的输入元素:
input[type="text"], input[type="password"] {
https://stackoverflow.com/questions/38404343
复制相似问题