因为您只在上应用了css
.footer input[type='text']
...您需要向提供相同的css
input[type='number']
和
input[type='email']
喜欢
.footer input[type='text'],
.footer input[type='email'],
.footer input[type='number'] {
width: 251px;
height: 33px;
padding-left: 15px;
border: 2px solid #919191;
outline: 0px;
color: #919191;
margin-bottom: 15px;
background: transparent;
transition: all .5s !important;
-webkit-transition: all .5s !important;
-o-transition: all .5s !important;
-ms-transition: all .5s !important;
-moz-transition: all .5s !important;
}
...或者另一种解决方案是,我建议在所有输入类型中使用相同的类,比如
input-control
喜欢
HTML
<input class="input-control" type="text" name="Name" placeholder="Your Name" required/><br />
<input class="input-control" type="number" name="Phone" placeholder="Phone Number" required title="Valid phone number (Without + marks)"/><br />
<input class="input-control" type="email" name="Email" placeholder="Email Address" required title="Valid Email Format:example@example.com" /><br />
CSS
.footer .input-control {
width: 251px;
height: 33px;
padding-left: 15px;
border: 2px solid #919191;
outline: 0px;
color: #919191;
margin-bottom: 15px;
background: transparent;
transition: all .5s !important;
-webkit-transition: all .5s !important;
-o-transition: all .5s !important;
-ms-transition: all .5s !important;
-moz-transition: all .5s !important;
}