forms - 为什么 Bootstrap 4 Form 密码字段字体有意外的下划线?
问题描述
密码字段字体中出现意外的下划线 ,此表单位于bootstrap 4 模态中
<form method="post">
<div class="form-group">
<label for="username"><u>Username:</u></label>
<input type="text" class="form-control" id="username" name="username"
autocomplete="off" autofocus required>
</div>
<div class="form-group">
<label for="password"><u>Password:<u></label>
<input type="password" class="form-control" id="password"
name="password" autocomplete="off" required>
<a href="#">Forgot password?</a>
</div>
<div class="form-check">
<label class="form-check-label" for="check">
<input type="checkbox" class="form-check-input" id="check">Remember me
</label>
</div>
<center>
<button type="submit" name="login-btn" class="btn btn-success">Login</button>
</center>
</form>
HTML 代码
.form-control,.form-control:focus{
border-top: none;
border-left: none;
border-right: none;
border-bottom: 1px solid white;
border-radius: 0;
color: white;
background: none;
outline: none;
box-shadow: none;
padding: 0;
}
.form-check{
margin-top: 50px;
}
.form-check-input{
margin-top: .4rem;
width: 15px;
height: 15px;
}
我应用的CSS我也尝试了 text-decoration:none; 大多数情况下我可以说这不是边框。输入字段边框是白色的
解决方案
问题很可能是由于这一行:
<label for="password"><u>Password:<u></label>
您需要修复标记并使用关闭</u>
<label for="password"><u>Password:</u></label>
推荐阅读
- plsql - 匿名块内的更新失败但可以解决
- curl - 如何通过 curl 在 Watson 的 Text to Speech 服务中调整语音速度?
- django - 在外键中使用实例
- java - 将桥接网络上运行的 Docker 容器连接到 Localhost
- linq - Flattern LINQ Query SelectMany Result
- android - 更新 Firebase Crashlytics SDK 时出现问题
- kotlin - Kotlin:仅允许具有泛型的同一类的参数
- linux - PostgreSQL 错误:无法访问文件“$libdir/postgis-2.5”
- javascript - 无法访问对象内的 JSON 数据。财产
- sql-server - SQL Server CDC - Debezium Kafka 特定日期的快照