San*_*eep 11 html css bootstrap-4
我想在bootstrap 4中删除文本框大纲,但它不起作用.请让我如何删除此行.
CSS
#content #main-content input[type=text]{
border: 0;
border: 1px solid #ccc;
height: 40px;
padding-left: 10px;
outline: 0;
}
Run Code Online (Sandbox Code Playgroud)
HTML
<div class="form-group">
<label for="title">Title <span>*</span></label>
<input type="text" class="form-control" id="title" name="title" placeholder="Enter Title">
</div>
Run Code Online (Sandbox Code Playgroud)
And*_*hiu 15
您正在使用的主题设置box-shadow为inset 0 -2px 0 #2196F3开启focus.
你需要覆盖它,但不能覆盖它,none因为那只会删除它.您可能希望它保持相同的值,就像它没有集中时一样.简而言之,你需要这个:
textarea:focus,
textarea.form-control:focus,
input.form-control:focus,
input[type=text]:focus,
input[type=password]:focus,
input[type=email]:focus,
input[type=number]:focus,
[type=text].form-control:focus,
[type=password].form-control:focus,
[type=email].form-control:focus,
[type=tel].form-control:focus,
[contenteditable].form-control:focus {
box-shadow: inset 0 -1px 0 #ddd;
}
Run Code Online (Sandbox Code Playgroud)
另请注意,您需要在Bootstrap CSS和正在加载的主题之后加载此CSS.
Joh*_*ing 13
您可以添加shadow-noneBootstrap类以删除焦点轮廓:
<div class="form-label-group">
<input type="password" id="inputPassword" class="form-control shadow-none" placeholder="Password" required>
<label for="inputPassword">Password</label>
</div>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
20783 次 |
| 最近记录: |