【发布时间】:2023-03-30 09:26:01
【问题描述】:
我的 HTML 中有这个:
<label class="control-label" for="firstName">{{ 'OA_FIRST_NAME' | translate | uppercase }}<sup>*</sup></label>
<input
formControlName="firstName"
class="signup-input full-width"
type="text"
name="firstName"
required>
这在我的 SCSS 中:
input[name=firstName]:focus {
background-color: blue !important;
label[for=firstName] {
background-color: red !important;
color: green !important;
}
}
输入的蓝色背景有效,但标签根本没有改变。我做错了吗?
【问题讨论】: