如何删除Bootstrap 4中输入元素周围的蓝色边框?
每当我单击输入字段时,周围都会出现蓝色边框。如何删除或更改此问题?
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="Recipient's username"
aria-label="Recipient's username" aria-describedby="basic-addon2">
<div class="input-group-append">
<button type="button" class="btn btn-outline-primary mb- 2">Subscribe</button>
</div>
</div>
对于此代码,我编写了以下代码,但是它不是周围的蓝色边框,而是删除了输入内部的边框。
.input:focus {
outline: none !important;
}
Whenever I click on the input field, a blue border appears around it. How do I remove or change this?
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="Recipient's username"
aria-label="Recipient's username" aria-describedby="basic-addon2">
<div class="input-group-append">
<button type="button" class="btn btn-outline-primary mb- 2">Subscribe</button>
</div>
</div>
For this code, I wrote the following code, but instead of the blue border around it, it removed the border inside the input.
.input:focus {
outline: none !important;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将
box-shadow
属性设置为none喜欢:如果您不需要,请删除
Border Color
属性。You can set the
box-shadow
property to none like:remove the
border color
property too if you don't need it.