首页 > 解决方案 > 删除输入字段的边框,但保留底部

问题描述

我有很多输入字段,但我只想显示底部边框。我已经尝试过使用

border-left: none;
border-width: 0;

但这没有用。

标签: css

解决方案


只需使用 CSS 删除所有输入字段上除底部边框外的所有边框。请参阅下面的代码片段。

input {
  margin: 20px;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom:0.5px solid black;
}
<input type="text"> <br />
<input type="text"> <br />
<input type="text">


推荐阅读