【发布时间】:2020-10-09 02:54:09
【问题描述】:
我有一个角度反应形式,我想在值更改时更改所有输入字段的背景颜色。一些输入字段是预先填充的,而不是必填字段。我尝试了following solution I found out,但它需要我的输入字段:
<div class="form-group">
<input type="text" class="form-control" required>
</div>
.form-control:valid {
background-color: #96d3ec!important;
}
想知道表单控件是否有类似的东西:
.form-control:changed {
background-color: #96d3ec!important;
}
【问题讨论】:
标签: javascript html css typescript