只有底部边框的输入文本字段 [英] Input text field with only bottom border
本文介绍了只有底部边框的输入文本字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何设置文本 input
字段的样式以使其只有这样的 border-bottom
?
How do I style the text input
field to make it only have a border-bottom
like this one?
预期文本 Input
字段
推荐答案
使用 outline:0
for chrome.. 然后随意设置 border-bottom
Use outline:0
for chrome.. and then just set border-bottom
as you like
input {
outline: 0;
border-width: 0 0 2px;
border-color: blue
}
input:focus {
border-color: green
}
<input placeholder="Text" type="text" />
这篇关于只有底部边框的输入文本字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文